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

Unified Diff: metrics_daemon_main.cc

Issue 6486021: Collect some disk statistics. (Closed) Base URL: http://git.chromium.org/git/metrics.git@master
Patch Set: Change metrix prefix Filesystem back to Platform Created 9 years, 10 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
« no previous file with comments | « metrics_daemon.cc ('k') | metrics_daemon_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: metrics_daemon_main.cc
diff --git a/metrics_daemon_main.cc b/metrics_daemon_main.cc
index f3f071425b71582302c246333b0ac760f2d83e01..899256cffccbd6948d2699b4b12ebbfbff5951fc 100644
--- a/metrics_daemon_main.cc
+++ b/metrics_daemon_main.cc
@@ -9,11 +9,14 @@
DEFINE_bool(daemon, true, "run as daemon (use -nodaemon for debugging)");
+// Path to disk stats. This may be system dependent.
+const char kMetricsMainDiskStatsPath[] = "/sys/class/block/sda/stat";
+
int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true);
MetricsLibrary metrics_lib;
metrics_lib.Init();
MetricsDaemon daemon;
- daemon.Init(false, &metrics_lib);
+ daemon.Init(false, &metrics_lib, kMetricsMainDiskStatsPath);
daemon.Run(FLAGS_daemon);
}
« no previous file with comments | « metrics_daemon.cc ('k') | metrics_daemon_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698