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

Side by Side Diff: src/platform/init/dump-boot-stats.conf

Issue 1649007: metrics cleanup and fixes. (Closed)
Patch Set: Expose the pass/fail status. 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 | « no previous file | src/platform/metrics/metrics_client.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) 2009 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium OS 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 # dump-boot-stats 5 # dump-boot-stats
6 # 6 #
7 # when login-prompt-ready is received, grabs the current uptime and 7 # when login-prompt-ready is received, grabs the current uptime and
8 # disk stats. Also sends uptime to metrics client for perf dashboard 8 # disk stats. Also sends uptime to metrics client for perf dashboard
9 9
10 start on login-prompt-ready 10 start on login-prompt-ready
11 11
12 # This is run-once rather than a service. 12 # This is run-once rather than a service.
13 task 13 task
14 14
15 script 15 script
16 UPTIME_STATS=`cat /proc/uptime` 16 UPTIME_STATS=`cat /proc/uptime`
17 DISK_STATS=`cat /sys/block/sda/stat` 17 DISK_STATS=`cat /sys/block/sda/stat`
18 18
19 BOOT_TIME=`echo $UPTIME_STATS | cut -f 1 -d ' '` 19 BOOT_TIME=`echo $UPTIME_STATS | cut -f 1 -d ' '`
20 BOOT_TIME_INT=`echo $BOOT_TIME | cut -f 1 -d '.'`
21 BOOT_TIME_FRACT=`echo $BOOT_TIME | cut -f 2 -d '.'`
22 BOOT_TIME_MSECS=$((BOOT_TIME_INT * 1000 + BOOT_TIME_FRACT * 10))
23
24 SECTORS_READ=`echo $DISK_STATS | cut -f 3 -d ' '` 20 SECTORS_READ=`echo $DISK_STATS | cut -f 3 -d ' '`
25 SECTORS_WRITTEN=`echo $DISK_STATS | cut -f 7 -d ' '` 21 SECTORS_WRITTEN=`echo $DISK_STATS | cut -f 7 -d ' '`
26 22
27 /usr/bin/metrics_client BootTime $BOOT_TIME_MSECS & 23 /usr/bin/metrics_client -t BootTime $BOOT_TIME &
28 /usr/bin/metrics_client BootSectorsRead $SECTORS_READ & 24 /usr/bin/metrics_client BootSectorsRead $SECTORS_READ &
29 /usr/bin/metrics_client BootSectorsWritten $SECTORS_WRITTEN & 25 /usr/bin/metrics_client BootSectorsWritten $SECTORS_WRITTEN &
30 26
31 echo $UPTIME_STATS > /tmp/uptime-login-prompt-ready 27 echo $UPTIME_STATS > /tmp/uptime-login-prompt-ready
32 echo $DISK_STATS > /tmp/disk-login-prompt-ready 28 echo $DISK_STATS > /tmp/disk-login-prompt-ready
33 end script 29 end script
OLDNEW
« no previous file with comments | « no previous file | src/platform/metrics/metrics_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698