// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_METRICS_PRESSURE_PRESSURE_METRICS_REPORTER_H_
#define CHROME_BROWSER_METRICS_PRESSURE_PRESSURE_METRICS_REPORTER_H_

#include "base/sequence_checker.h"
#include "base/threading/sequence_bound.h"
#include "base/timer/timer.h"
#include "base/trace_event/trace_session_observer.h"
#include "chrome/browser/metrics/pressure/pressure_metrics.h"

// Contains the code working on the worker sequence.
class PressureMetricsWorker;

// MemoryMetrics periodically collects and reports pressure metrics (Pressure
// Stall Information). This class is responsible for retrieving memory pressure
// stall information.
//
// Pressure metrics are sampled and reported through UMA
// (see: System.Pressure.*).
//
// Metrics are also reported through tracing as counters.
class PressureMetricsReporter {
 public:
  PressureMetricsReporter();
  ~PressureMetricsReporter();

 private:
  base::SequenceBound<PressureMetricsWorker> worker_;
};

#endif  // CHROME_BROWSER_METRICS_PRESSURE_PRESSURE_METRICS_REPORTER_H_
