Commit 37c3a555 authored by Oystein Eftevaag's avatar Oystein Eftevaag Committed by Commit Bot

Slow Reports: Add tracing category interesting for serviceworkers

R=etienneb@chromium.org

Change-Id: Ied7a5a0dd3316f105dca5d7a946081b7f08f24b2
Reviewed-on: https://chromium-review.googlesource.com/c/1323704Reviewed-by: default avatarEtienne Bergeron <etienneb@chromium.org>
Commit-Queue: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606556}
parent 72cfb5ea
...@@ -37,6 +37,7 @@ const char kConfigCategoryBenchmarkExecutionMetric[] = ...@@ -37,6 +37,7 @@ const char kConfigCategoryBenchmarkExecutionMetric[] =
"BENCHMARK_EXECUTION_METRIC"; "BENCHMARK_EXECUTION_METRIC";
const char kConfigCategoryBenchmarkNavigation[] = "BENCHMARK_NAVIGATION"; const char kConfigCategoryBenchmarkNavigation[] = "BENCHMARK_NAVIGATION";
const char kConfigCategoryBenchmarkRenderers[] = "BENCHMARK_RENDERERS"; const char kConfigCategoryBenchmarkRenderers[] = "BENCHMARK_RENDERERS";
const char kConfigCategoryBenchmarkServiceworker[] = "BENCHMARK_SERVICEWORKER";
const char kConfigCategoryBlinkStyle[] = "BLINK_STYLE"; const char kConfigCategoryBlinkStyle[] = "BLINK_STYLE";
} // namespace } // namespace
...@@ -73,6 +74,8 @@ std::string BackgroundTracingConfigImpl::CategoryPresetToString( ...@@ -73,6 +74,8 @@ std::string BackgroundTracingConfigImpl::CategoryPresetToString(
return kConfigCategoryBenchmarkNavigation; return kConfigCategoryBenchmarkNavigation;
case BackgroundTracingConfigImpl::BENCHMARK_RENDERERS: case BackgroundTracingConfigImpl::BENCHMARK_RENDERERS:
return kConfigCategoryBenchmarkRenderers; return kConfigCategoryBenchmarkRenderers;
case BackgroundTracingConfigImpl::BENCHMARK_SERVICEWORKER:
return kConfigCategoryBenchmarkServiceworker;
case BackgroundTracingConfigImpl::BLINK_STYLE: case BackgroundTracingConfigImpl::BLINK_STYLE:
return kConfigCategoryBlinkStyle; return kConfigCategoryBlinkStyle;
case BackgroundTracingConfigImpl::CATEGORY_PRESET_UNSET: case BackgroundTracingConfigImpl::CATEGORY_PRESET_UNSET:
...@@ -140,6 +143,11 @@ bool BackgroundTracingConfigImpl::StringToCategoryPreset( ...@@ -140,6 +143,11 @@ bool BackgroundTracingConfigImpl::StringToCategoryPreset(
return true; return true;
} }
if (category_preset_string == kConfigCategoryBenchmarkServiceworker) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_SERVICEWORKER;
return true;
}
if (category_preset_string == kConfigCategoryBlinkStyle) { if (category_preset_string == kConfigCategoryBlinkStyle) {
*category_preset = BackgroundTracingConfigImpl::BLINK_STYLE; *category_preset = BackgroundTracingConfigImpl::BLINK_STYLE;
return true; return true;
......
...@@ -39,6 +39,7 @@ class CONTENT_EXPORT BackgroundTracingConfigImpl ...@@ -39,6 +39,7 @@ class CONTENT_EXPORT BackgroundTracingConfigImpl
BENCHMARK_EXECUTION_METRIC, BENCHMARK_EXECUTION_METRIC,
BENCHMARK_NAVIGATION, BENCHMARK_NAVIGATION,
BENCHMARK_RENDERERS, BENCHMARK_RENDERERS,
BENCHMARK_SERVICEWORKER,
BLINK_STYLE BLINK_STYLE
}; };
......
...@@ -692,6 +692,12 @@ TraceConfig BackgroundTracingManagerImpl::GetConfigForCategoryPreset( ...@@ -692,6 +692,12 @@ TraceConfig BackgroundTracingManagerImpl::GetConfigForCategoryPreset(
"disabled-by-default-renderer.scheduler," "disabled-by-default-renderer.scheduler,"
"disabled-by-default-system_stats,disabled-by-default-cpu_profiler", "disabled-by-default-system_stats,disabled-by-default-cpu_profiler",
record_mode); record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_SERVICEWORKER:
return TraceConfig(
"benchmark,toplevel,ipc,base,ServiceWorker,CacheStorage,Blob,"
"loader,loading,navigation,blink.user_timing,"
"disabled-by-default-network",
record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BLINK_STYLE: case BackgroundTracingConfigImpl::CategoryPreset::BLINK_STYLE:
return TraceConfig("blink_style", record_mode); return TraceConfig("blink_style", record_mode);
...@@ -707,7 +713,6 @@ TraceConfig BackgroundTracingManagerImpl::GetConfigForCategoryPreset( ...@@ -707,7 +713,6 @@ TraceConfig BackgroundTracingManagerImpl::GetConfigForCategoryPreset(
config.ResetMemoryDumpConfig(memory_config); config.ResetMemoryDumpConfig(memory_config);
return config; return config;
} }
case BackgroundTracingConfigImpl::CategoryPreset::CATEGORY_PRESET_UNSET: case BackgroundTracingConfigImpl::CategoryPreset::CATEGORY_PRESET_UNSET:
NOTREACHED(); NOTREACHED();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment