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

Side by Side Diff: base/trace_event/trace_config_unittest.cc

Issue 2041583003: [tracing] Introduce "allowed_dump_modes" for memory dump config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@background_config
Patch Set: Change mode to int. 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
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 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/trace_event/memory_dump_manager.h" 9 #include "base/trace_event/memory_dump_manager.h"
10 #include "base/trace_event/trace_config.h" 10 #include "base/trace_event/trace_config.h"
(...skipping 17 matching lines...) Expand all
28 "{" 28 "{"
29 "\"enable_argument_filter\":true," 29 "\"enable_argument_filter\":true,"
30 "\"enable_sampling\":true," 30 "\"enable_sampling\":true,"
31 "\"enable_systrace\":true," 31 "\"enable_systrace\":true,"
32 "\"excluded_categories\":[\"excluded\",\"exc_pattern*\"]," 32 "\"excluded_categories\":[\"excluded\",\"exc_pattern*\"],"
33 "\"included_categories\":[\"included\"," 33 "\"included_categories\":[\"included\","
34 "\"inc_pattern*\"," 34 "\"inc_pattern*\","
35 "\"disabled-by-default-cc\"," 35 "\"disabled-by-default-cc\","
36 "\"disabled-by-default-memory-infra\"]," 36 "\"disabled-by-default-memory-infra\"],"
37 "\"memory_dump_config\":{" 37 "\"memory_dump_config\":{"
38 "\"allowed_dump_modes\":[\"background\",\"light\",\"detailed\"],"
38 "\"heap_profiler_options\":{" 39 "\"heap_profiler_options\":{"
39 "\"breakdown_threshold_bytes\":10240" 40 "\"breakdown_threshold_bytes\":10240"
40 "}," 41 "},"
41 "\"triggers\":[" 42 "\"triggers\":["
42 "{\"mode\":\"light\",\"periodic_interval_ms\":50}," 43 "{\"mode\":\"light\",\"periodic_interval_ms\":50},"
43 "{\"mode\":\"detailed\",\"periodic_interval_ms\":1000}" 44 "{\"mode\":\"detailed\",\"periodic_interval_ms\":1000}"
44 "]" 45 "]"
45 "}," 46 "},"
46 "\"record_mode\":\"record-continuously\"," 47 "\"record_mode\":\"record-continuously\","
47 "\"synthetic_delays\":[\"test.Delay1;16\",\"test.Delay2;32\"]" 48 "\"synthetic_delays\":[\"test.Delay1;16\",\"test.Delay2;32\"]"
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 EXPECT_NE(std::string::npos, tc.ToString().find("memory_dump_config")); 676 EXPECT_NE(std::string::npos, tc.ToString().find("memory_dump_config"));
676 EXPECT_EQ(2u, tc.memory_dump_config_.triggers.size()); 677 EXPECT_EQ(2u, tc.memory_dump_config_.triggers.size());
677 EXPECT_EQ(TraceConfig::MemoryDumpConfig::HeapProfiler 678 EXPECT_EQ(TraceConfig::MemoryDumpConfig::HeapProfiler
678 ::kDefaultBreakdownThresholdBytes, 679 ::kDefaultBreakdownThresholdBytes,
679 tc.memory_dump_config_.heap_profiler_options 680 tc.memory_dump_config_.heap_profiler_options
680 .breakdown_threshold_bytes); 681 .breakdown_threshold_bytes);
681 } 682 }
682 683
683 } // namespace trace_event 684 } // namespace trace_event
684 } // namespace base 685 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/trace_config_memory_test_util.h ('k') | content/browser/devtools/protocol/tracing_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698