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

Unified Diff: apps/benchmark/benchmark_app.cc

Issue 1316163003: Support duration events in `benchmark.mojo`. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | apps/benchmark/event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/benchmark/benchmark_app.cc
diff --git a/apps/benchmark/benchmark_app.cc b/apps/benchmark/benchmark_app.cc
index 20a514ddc77674d038ef2e7fc0096ea69f464825..d7a5b606fbd6e165e1fe9bc176848a88d9286b84 100644
--- a/apps/benchmark/benchmark_app.cc
+++ b/apps/benchmark/benchmark_app.cc
@@ -14,6 +14,7 @@
#include "base/bind.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
@@ -46,7 +47,9 @@ class BenchmarkApp : public mojo::ApplicationDelegate,
// categories targeted in measurements.
std::set<std::string> category_set;
for (const Measurement& measurement : args_.measurements) {
- category_set.insert(measurement.target_event.category);
+ std::vector<std::string> categories;
+ base::SplitString(measurement.target_event.categories, ',', &categories);
+ category_set.insert(categories.begin(), categories.end());
}
std::vector<std::string> unique_categories(category_set.begin(),
category_set.end());
« no previous file with comments | « no previous file | apps/benchmark/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698