void InstanceUtil::flushMetricsToSinks(const std::list<Stats::SinkPtr>& sinks,
                                       Stats::Store& store) {
  // Create a snapshot and flush to all sinks.
  // NOTE: Even if there are no sinks, creating the snapshot has the important property that it
  //       latches all counters on a periodic basis. The hot restart code assumes this is being
  //       done so this should not be removed.
  MetricSnapshotImpl snapshot(store);
  for (const auto& sink : sinks) {
    sink->flush(snapshot);
  }
}
void InstanceUtil::flushMetricsToSinks(const std::list<Stats::SinkPtr>& sinks,
                                       Stats::Store& store) {
   
   
   
   
  MetricSnapshotImpl snapshot(store);
  for (const auto& sink : sinks) {
    sink->flush(snapshot);
  }
}