Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium 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 from infra_libs.ts_mon import metrics | 5 from infra_libs.ts_mon.metrics import CumulativeDistributionMetric |
| 6 from infra_libs.ts_mon.metrics import CounterMetric | |
| 6 | 7 |
| 7 request_bytes = metrics.CumulativeDistributionMetric('http/request_bytes') | 8 request_bytes = CumulativeDistributionMetric('http/request_bytes') |
|
agable
2015/08/12 22:18:08
These all seem like great metrics to have built in
jshu
2015/08/14 20:47:56
good call
| |
| 8 response_bytes = metrics.CumulativeDistributionMetric('http/response_bytes') | 9 response_bytes = CumulativeDistributionMetric('http/response_bytes') |
| 9 durations = metrics.CumulativeDistributionMetric('http/durations') | 10 durations = CumulativeDistributionMetric('http/durations') |
| 10 response_status = metrics.CounterMetric('http/response_status') | 11 response_status = CounterMetric('http/response_status') |
| 11 | 12 |
| 12 | 13 |
| 13 def _reset_for_testing(): # pragma: no cover | 14 def _reset_for_testing(): # pragma: no cover |
| 14 for metric in (request_bytes, response_bytes, durations, response_status): | 15 for metric in (request_bytes, response_bytes, durations, response_status): |
| 15 metric.reset() | 16 metric.reset() |
| OLD | NEW |