OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 FREQ=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) | 7 FREQ=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) |
8 AWK_PROG=' | 8 AWK_PROG=' |
9 /Initial TSC value:/ { | 9 /Initial TSC value:/ { |
10 sub(".*Initial TSC value: ", "") | 10 sub(".*Initial TSC value: ", "") |
(...skipping 14 matching lines...) Expand all Loading... |
25 echo $FIRMWARE_TIME >/tmp/firmware-boot-time | 25 echo $FIRMWARE_TIME >/tmp/firmware-boot-time |
26 | 26 |
27 # usage: | 27 # usage: |
28 # report_disk_metrics <read-sectors> <write-sectors> | 28 # report_disk_metrics <read-sectors> <write-sectors> |
29 report_disk_metrics() { | 29 report_disk_metrics() { |
30 metrics_client Platform.BootSectorsRead $1 1 1000000 50 | 30 metrics_client Platform.BootSectorsRead $1 1 1000000 50 |
31 metrics_client Platform.BootSectorsWritten $2 1 10000 50 | 31 metrics_client Platform.BootSectorsWritten $2 1 10000 50 |
32 } | 32 } |
33 | 33 |
34 report_disk_metrics $( | 34 report_disk_metrics $( |
35 bootstat_get_last login-prompt-ready read-sectors write-sectors) | 35 bootstat_get_last boot-complete read-sectors write-sectors) |
36 | 36 |
37 send_metrics_on_resume -b | 37 send_metrics_on_resume -b |
OLD | NEW |