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

Side by Side Diff: telemetry/telemetry/timeline/tracing_config.py

Issue 2043203003: Add MemoryInfra overheads to tracingMetrics (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: Renames to memory-infra. Created 4 years, 6 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
« no previous file with comments | « no previous file | tracing/tracing/metrics/tracing_metric.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import re 5 import re
6 6
7 from telemetry.timeline import tracing_category_filter 7 from telemetry.timeline import tracing_category_filter
8 8
9 RECORD_MODE_PARAM = 'record_mode' 9 RECORD_MODE_PARAM = 'record_mode'
10 ENABLE_SYSTRACE_PARAM = 'enable_systrace' 10 ENABLE_SYSTRACE_PARAM = 'enable_systrace'
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 """Stores the triggers for memory dumps in ChromeTraceConfig.""" 334 """Stores the triggers for memory dumps in ChromeTraceConfig."""
335 def __init__(self): 335 def __init__(self):
336 self._triggers = [] 336 self._triggers = []
337 337
338 def AddTrigger(self, mode, periodic_interval_ms): 338 def AddTrigger(self, mode, periodic_interval_ms):
339 """Adds a new trigger to config. 339 """Adds a new trigger to config.
340 340
341 Args: 341 Args:
342 periodic_interval_ms: Dump time period in milliseconds. 342 periodic_interval_ms: Dump time period in milliseconds.
343 level_of_detail: Memory dump level of detail string. 343 level_of_detail: Memory dump level of detail string.
344 Valid arguments are "light" and "detailed". 344 Valid arguments are "background", "light" and "detailed".
345 """ 345 """
346 assert mode in ['light', 'detailed'] 346 assert mode in ['background', 'light', 'detailed']
347 assert periodic_interval_ms > 0 347 assert periodic_interval_ms > 0
348 self._triggers.append({'mode': mode, 348 self._triggers.append({'mode': mode,
349 'periodic_interval_ms': periodic_interval_ms}) 349 'periodic_interval_ms': periodic_interval_ms})
350 350
351 def GetDictForChromeTracing(self): 351 def GetDictForChromeTracing(self):
352 """Returns the dump config as dictionary for chrome tracing.""" 352 """Returns the dump config as dictionary for chrome tracing."""
353 # An empty trigger list would mean no periodic memory dumps. 353 # An empty trigger list would mean no periodic memory dumps.
354 return {'memory_dump_config': {'triggers': self._triggers}} 354 return {'memory_dump_config': {'triggers': self._triggers}}
OLDNEW
« no previous file with comments | « no previous file | tracing/tracing/metrics/tracing_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698