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

Unified Diff: chrome/test/perf/rendering/throughput_tests.cc

Issue 9187015: Remove usage of using namespace, and cleanup trace_analyzer namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile Created 8 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
« no previous file with comments | « chrome/test/perf/rendering/latency_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/perf/rendering/throughput_tests.cc
diff --git a/chrome/test/perf/rendering/throughput_tests.cc b/chrome/test/perf/rendering/throughput_tests.cc
index 5f7597cec69187449118c9967902163e330667c0..8e764e4fd9f311c8c9dc27342e0c226e212ae433 100644
--- a/chrome/test/perf/rendering/throughput_tests.cc
+++ b/chrome/test/perf/rendering/throughput_tests.cc
@@ -71,7 +71,9 @@ class ThroughputTest : public BrowserPerfTest {
}
void RunTest(const std::string& test_name, ThroughputTestFlags flags) {
- using namespace trace_analyzer;
+ using trace_analyzer::Query;
+ using trace_analyzer::TraceAnalyzer;
+ using trace_analyzer::TraceEventVector;
if (use_gpu_ && !IsGpuAvailable()) {
LOG(WARNING) << "Test skipped: requires gpu. Pass --enable-gpu on the "
@@ -108,7 +110,7 @@ class ThroughputTest : public BrowserPerfTest {
// Check if GPU is rendering:
analyzer.reset(TraceAnalyzer::Create(json_events));
- bool ran_on_gpu = (analyzer->FindEvents(Query(EVENT_NAME) ==
+ bool ran_on_gpu = (analyzer->FindEvents(Query::EventName() ==
Query::String("SwapBuffers"), &events_gpu) > 0u);
LOG(INFO) << "Mode: " << (ran_on_gpu ? "GPU" : "Software");
EXPECT_EQ(use_gpu_, ran_on_gpu);
@@ -122,8 +124,8 @@ class ThroughputTest : public BrowserPerfTest {
// Search for frame ticks. We look for both SW and GPU frame ticks so that
// the test can verify that only one or the other are found.
analyzer.reset(TraceAnalyzer::Create(json_events));
- Query query_sw = Query(EVENT_NAME) == Query::String("TestFrameTickSW");
- Query query_gpu = Query(EVENT_NAME) == Query::String("TestFrameTickGPU");
+ Query query_sw = Query::EventName() == Query::String("TestFrameTickSW");
+ Query query_gpu = Query::EventName() == Query::String("TestFrameTickGPU");
analyzer->FindEvents(query_sw, &events_sw);
analyzer->FindEvents(query_gpu, &events_gpu);
TraceEventVector* frames = NULL;
@@ -139,7 +141,7 @@ class ThroughputTest : public BrowserPerfTest {
// Cull a few leading and trailing events as they might be unreliable.
TraceEventVector rate_events(frames->begin() + kIgnoreSomeFrames,
frames->end() - kIgnoreSomeFrames);
- RateStats stats;
+ trace_analyzer::RateStats stats;
ASSERT_TRUE(GetRateStats(rate_events, &stats));
printf("FPS = %f\n", 1000000.0 / stats.mean_us);
« no previous file with comments | « chrome/test/perf/rendering/latency_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698