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
3 // found in the LICENSE file.
5 #ifndef BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_
6 #define BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_
8 #include "base/strings/stringprintf.h"
9 #include "base/trace_event/memory_dump_manager.h"
12 namespace trace_event
{
14 class TraceConfigMemoryTestUtil
{
16 static std::string
GetTraceConfig_PeriodicTriggers(int light_period
,
20 "\"enable_argument_filter\":false,"
21 "\"enable_sampling\":false,"
22 "\"enable_systrace\":false,"
23 "\"included_categories\":["
26 "\"memory_dump_config\":{"
30 "\"periodic_interval_ms\":%d"
33 "\"mode\":\"detailed\","
34 "\"periodic_interval_ms\":%d"
38 "\"record_mode\":\"record-until-full\""
39 "}", MemoryDumpManager::kTraceCategory
, light_period
, heavy_period
);
42 static std::string
GetTraceConfig_EmptyTriggers() {
45 "\"enable_argument_filter\":false,"
46 "\"enable_sampling\":false,"
47 "\"enable_systrace\":false,"
48 "\"included_categories\":["
51 "\"memory_dump_config\":{"
55 "\"record_mode\":\"record-until-full\""
56 "}", MemoryDumpManager::kTraceCategory
);
59 static std::string
GetTraceConfig_NoTriggers() {
62 "\"enable_argument_filter\":false,"
63 "\"enable_sampling\":false,"
64 "\"enable_systrace\":false,"
65 "\"included_categories\":["
68 "\"record_mode\":\"record-until-full\""
69 "}", MemoryDumpManager::kTraceCategory
);
73 } // namespace trace_event
76 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_