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

Side by Side Diff: tools/android/device_stats_monitor/device_stats_monitor.cc

Issue 12473004: src/: Update the remaining include paths of string_split.h to its new location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/syncable/model_type.cc ('k') | tools/android/forwarder2/host_forwarder_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Dumps CPU and IO stats to a file at a regular interval. 5 // Dumps CPU and IO stats to a file at a regular interval.
6 // 6 //
7 // Output may be post processed by host to get top/iotop style information. 7 // Output may be post processed by host to get top/iotop style information.
8 8
9 #include <signal.h> 9 #include <signal.h>
10 #include <unistd.h> 10 #include <unistd.h>
11 11
12 #include <fstream> 12 #include <fstream>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/command_line.h" 16 #include "base/command_line.h"
17 #include "base/file_util.h" 17 #include "base/file_util.h"
18 #include "base/string_split.h" 18 #include "base/strings/string_split.h"
19 19
20 namespace { 20 namespace {
21 21
22 const char kIOStatsPath[] = "/proc/diskstats"; 22 const char kIOStatsPath[] = "/proc/diskstats";
23 const char kCPUStatsPath[] = "/proc/stat"; 23 const char kCPUStatsPath[] = "/proc/stat";
24 24
25 class DeviceStatsMonitor { 25 class DeviceStatsMonitor {
26 public: 26 public:
27 explicit DeviceStatsMonitor(const std::string& out_path) 27 explicit DeviceStatsMonitor(const std::string& out_path)
28 : out_path_(out_path), 28 : out_path_(out_path),
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 kDefaultHz; 99 kDefaultHz;
100 100
101 printf("Starting device stats monitor\n"); 101 printf("Starting device stats monitor\n");
102 g_device_stats_monitor = new DeviceStatsMonitor(args[0]); 102 g_device_stats_monitor = new DeviceStatsMonitor(args[0]);
103 signal(SIGTERM, SigTermHandler); 103 signal(SIGTERM, SigTermHandler);
104 g_device_stats_monitor->Start(hz); 104 g_device_stats_monitor->Start(hz);
105 delete g_device_stats_monitor; 105 delete g_device_stats_monitor;
106 106
107 return 0; 107 return 0;
108 } 108 }
OLDNEW
« no previous file with comments | « sync/syncable/model_type.cc ('k') | tools/android/forwarder2/host_forwarder_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698