Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: content/browser/memory/swap_metrics_observer_linux.h

Issue 2824133002: Record swap metrics (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/memory/swap_metrics_observer_linux.h
diff --git a/content/browser/memory/swap_metrics_observer_linux.h b/content/browser/memory/swap_metrics_observer_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..512d9eb7df425c3c13ae77b542380314e3ca07eb
--- /dev/null
+++ b/content/browser/memory/swap_metrics_observer_linux.h
@@ -0,0 +1,31 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_MEMORY_SWAP_METRICS_OBSERVER_LINUX_H_
+#define CONTENT_BROWSER_MEMORY_SWAP_METRICS_OBSERVER_LINUX_H_
+
+#include "content/browser/memory/swap_metrics_observer.h"
+
+namespace content {
+
+class SwapMetricsObserverLinux : public SwapMetricsObserver {
+ public:
+ static SwapMetricsObserverLinux* GetInstance();
Primiano Tucci (use gerrit) 2017/04/27 10:01:20 you don't seem to make any use of this specialized
bashi 2017/04/28 02:05:35 Done.
+
+ SwapMetricsObserverLinux();
+ ~SwapMetricsObserverLinux() override;
+
+ protected:
+ void UpdateMetricsInternal(base::TimeDelta interval) override;
+
+ private:
+ friend struct base::LeakySingletonTraits<SwapMetricsObserverLinux>;
+
+ uint64_t last_pswpin_ = 0;
+ uint64_t last_pswpout_ = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEMORY_SWAP_METRICS_OBSERVER_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698