Only enable the Dart timeline for benchmarks
- Print the event's map if we encounter an error in benchmark_app.
- Add --dart-timeline flag to Dart content handler.
- s/--complete-timeline/--dart-timeline.
Sometimes we were generating a gigabyte of JSON text resulting in a timeout. This should fix that.
R=zra@google.com
Review URL: https://codereview.chromium.org/1665823003 .
diff --git a/apps/benchmark/event.cc b/apps/benchmark/event.cc
index aa9ce70..69f56d2 100644
--- a/apps/benchmark/event.cc
+++ b/apps/benchmark/event.cc
@@ -193,6 +193,7 @@
base::DictionaryValue* event_dict;
if (!val->GetAsDictionary(&event_dict)) {
LOG(WARNING) << "Ignoring incorrect trace event (not a dictionary)";
+ LOG(WARNING) << *event_dict;
continue;
}
@@ -201,6 +202,7 @@
std::string phase;
if (!event_dict->GetString("ph", &phase)) {
LOG(WARNING) << "Ignoring incorrect trace event (missing phase)";
+ LOG(WARNING) << *event_dict;
continue;
}
if (phase == "X") {
@@ -214,6 +216,7 @@
if (!event_dict->GetString("name", &event.name)) {
LOG(ERROR) << "Incorrect trace event (no name)";
+ LOG(ERROR) << *event_dict;
return false;
}
@@ -224,6 +227,7 @@
double timestamp;
if (!event_dict->GetDouble("ts", ×tamp)) {
LOG(WARNING) << "Ingoring incorrect trace event (no timestamp)";
+ LOG(WARNING) << *event_dict;
continue;
}
event.timestamp = base::TimeTicks::FromInternalValue(timestamp);
@@ -232,6 +236,7 @@
double duration;
if (!event_dict->GetDouble("dur", &duration)) {
LOG(WARNING) << "Ignoring incorrect complete event (no duration)";
+ LOG(WARNING) << *event_dict;
continue;
}