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

Side by Side Diff: src/platform/metrics/syslog_parser.sh

Issue 1650006: Unify metrics_collection and metrics_daemon into metrics. (Closed)
Patch Set: PTAL -- further cleanup based on the ebuild cleanup. Created 10 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 unified diff | Download patch
« no previous file with comments | « src/platform/metrics/network_states.h ('k') | src/platform/metrics_collection/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! /bin/sh 1 #! /bin/sh
2 2
3 # This script parses /var/log/syslog for messages from programs that log 3 # This script parses /var/log/syslog for messages from programs that log
4 # uptime and disk stats (number of sectors read). It then outputs 4 # uptime and disk stats (number of sectors read). It then outputs
5 # these stats in a format usable by the metrics collector, which forwards 5 # these stats in a format usable by the metrics collector, which forwards
6 # them to autotest and UMA. 6 # them to autotest and UMA.
7 7
8 # To add a new metric add a line below, as PROGRAM_NAME METRIC_NAME. 8 # To add a new metric add a line below, as PROGRAM_NAME METRIC_NAME.
9 # PROGRAM_NAME is the name of the job whose start time we 9 # PROGRAM_NAME is the name of the job whose start time we
10 # are interested in. METRIC_NAME is the prefix we want to use for 10 # are interested in. METRIC_NAME is the prefix we want to use for
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 # Do all the differencing here 60 # Do all the differencing here
61 program="${program}\ 61 program="${program}\
62 END{ 62 END{
63 for (i in metrics_stop) { 63 for (i in metrics_stop) {
64 value_time = metrics_stop[i] - metrics_start[i]; 64 value_time = metrics_stop[i] - metrics_start[i];
65 print i \"=\" value_time; 65 print i \"=\" value_time;
66 } 66 }
67 }" 67 }"
68 68
69 exec awk "$program" /var/log/syslog 69 exec awk "$program" /var/log/syslog
OLDNEW
« no previous file with comments | « src/platform/metrics/network_states.h ('k') | src/platform/metrics_collection/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698