| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 | 62 |
| 63 bool ReportMetrics(MetricsAggregatorPosix *aggregator, | 63 bool ReportMetrics(MetricsAggregatorPosix *aggregator, |
| 64 const char* extra_url_data, | 64 const char* extra_url_data, |
| 65 const char* user_agent, | 65 const char* user_agent, |
| 66 uint32 interval) { | 66 uint32 interval) { |
| 67 Formatter formatter(PRODUCT_NAME_STRING, interval); | 67 Formatter formatter(PRODUCT_NAME_STRING, interval); |
| 68 aggregator->FormatMetrics(&formatter); | 68 aggregator->FormatMetrics(&formatter); |
| 69 | 69 |
| 70 return UploadMetrics(extra_url_data, user_agent, formatter.output()); | 70 DLOG(INFO) << "formatter.output() = " << formatter.output(); |
| 71 return UploadMetrics(extra_url_data, user_agent, formatter.output().c_str()); |
| 71 } | 72 } |
| 72 | 73 |
| 73 } // namespace | 74 } // namespace |
| 74 | 75 |
| 75 namespace stats_report { | 76 namespace stats_report { |
| 76 | 77 |
| 77 bool AggregateMetrics() { | 78 bool AggregateMetrics() { |
| 78 MetricsAggregatorPosix aggregator(g_global_metrics); | 79 MetricsAggregatorPosix aggregator(g_global_metrics); |
| 79 return ::AggregateMetrics(&aggregator); | 80 return ::AggregateMetrics(&aggregator); |
| 80 } | 81 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // No matter what, wait another upload interval to try again. It's better | 142 // No matter what, wait another upload interval to try again. It's better |
| 142 // to report older stats than hammer on the stats server exactly when it's | 143 // to report older stats than hammer on the stats server exactly when it's |
| 143 // failed. | 144 // failed. |
| 144 (void)aggregator.SetValue(kLastTransmissionTimeValueName, now); | 145 (void)aggregator.SetValue(kLastTransmissionTimeValueName, now); |
| 145 return report_result; | 146 return report_result; |
| 146 } | 147 } |
| 147 return false; | 148 return false; |
| 148 } | 149 } |
| 149 | 150 |
| 150 } // namespace stats_report | 151 } // namespace stats_report |
| OLD | NEW |