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

Side by Side Diff: infra_libs/http_metrics.py

Issue 1260293009: make version of ts_mon compatible with appengine (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: set correct metric and target fields Created 5 years, 4 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
OLDNEW
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()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698