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

Unified Diff: tools/telemetry/examples/benchmarks/v8_metric.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/examples/benchmarks/v8_metric.py
diff --git a/tools/telemetry/examples/benchmarks/v8_metric.py b/tools/telemetry/examples/benchmarks/v8_metric.py
deleted file mode 100644
index 91efdadbd6fff96977469c936ba6a5c6cfdb768c..0000000000000000000000000000000000000000
--- a/tools/telemetry/examples/benchmarks/v8_metric.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from telemetry.value import improvement_direction
-from telemetry.value import scalar
-from telemetry.web_perf.metrics import timeline_based_metric
-
-def _IsMessageLoopEvent(event):
- return event.name.startswith('v8')
-
-
-class _AverageMessageLoopLatency(scalar.ScalarValue):
- def __init__(self, value, page, tir_label, none_value_reason=None):
- super(_AverageMessageLoopLatency, self).__init__(
- page=page, name='avg_v8_events_latency', value=value,
- tir_label=tir_label,
- units='ms', improvement_direction=improvement_direction.DOWN,
- description=('Average wall-time latency of message loop events during '
- 'any of the interaction records\' time ranges'),
- none_value_reason=none_value_reason)
-
-
-class MessageLoopLatencyMetric(timeline_based_metric.TimelineBasedMetric):
-
- def AddResults(self, model, renderer_thread, interactions, results):
- v8_events = []
- for event in model.IterAllEvents(event_predicate=_IsMessageLoopEvent):
- if timeline_based_metric.IsEventInInteractions(event, interactions):
- v8_events.append(event)
-
- if v8_events:
- avg = (
- sum(e.duration for e in v8_events)/len(v8_events))
- results.AddValue(_AverageMessageLoopLatency(
- value=avg, page=results.current_page,
- tir_label=interactions[0].label))
- else:
- results.AddValue(_AverageMessageLoopLatency(
- None, page=results.current_page,
- tir_label=interactions[0].label,
- none_value_reason='No v8 events found.'))
« no previous file with comments | « tools/telemetry/examples/benchmarks/v8_benchmark.py ('k') | tools/telemetry/examples/credentials_example.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698