| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include <errno.h> | 5 #include <errno.h> |
| 6 #include <sys/file.h> | 6 #include <sys/file.h> |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 | 9 |
| 10 #include <cstdlib> | 10 #include <cstdlib> |
| 11 #include <iostream> | 11 #include <iostream> |
| 12 | 12 |
| 13 #include "platform/metrics_collection/metrics_library.h" | 13 #include "metrics_library.h" |
| 14 | 14 |
| 15 using namespace std; | 15 using namespace std; |
| 16 | 16 |
| 17 // Usage: metrics_client [-ab] metric_name metric_value | 17 // Usage: metrics_client [-ab] metric_name metric_value |
| 18 int main(int argc, char** argv) { | 18 int main(int argc, char** argv) { |
| 19 bool send_to_autotest = false; | 19 bool send_to_autotest = false; |
| 20 bool send_to_chrome = true; | 20 bool send_to_chrome = true; |
| 21 int metric_name_index = 1; | 21 int metric_name_index = 1; |
| 22 int metric_value_index = 2; | 22 int metric_value_index = 2; |
| 23 bool print_usage = false; | 23 bool print_usage = false; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 if (send_to_autotest) { | 64 if (send_to_autotest) { |
| 65 MetricsLibrary::SendToAutotest(argv[metric_name_index], | 65 MetricsLibrary::SendToAutotest(argv[metric_name_index], |
| 66 argv[metric_value_index]); | 66 argv[metric_value_index]); |
| 67 } | 67 } |
| 68 if (send_to_chrome) { | 68 if (send_to_chrome) { |
| 69 MetricsLibrary::SendToChrome(argv[metric_name_index], | 69 MetricsLibrary::SendToChrome(argv[metric_name_index], |
| 70 argv[metric_value_index]); | 70 argv[metric_value_index]); |
| 71 } | 71 } |
| 72 return 0; | 72 return 0; |
| 73 } | 73 } |
| OLD | NEW |