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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 1849643002: Add support for async, metadata, and counter timeline events to be reported by the embedder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/timeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index d8d4fb05b2af148d16d1404a7101366aa00b5c43..b94ff3b185e8b0963f59696b5205a9e2b42a947e 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -9539,6 +9539,22 @@ TEST_CASE(Timeline_Dart_GlobalTimelineGetTrace) {
1,
&arg_names[0],
&arg_values[0]);
+ // Add metadata to the embedder stream.
+ Dart_TimelineEvent("METADATA_EVENT",
+ Dart_TimelineGetMicros(),
+ 0,
+ Dart_Timeline_Event_Metadata,
+ 0,
+ NULL,
+ NULL);
+ // Add counter to the embedder stream.
+ Dart_TimelineEvent("COUNTER_EVENT",
+ Dart_TimelineGetMicros(),
+ 0,
+ Dart_Timeline_Event_Counter,
+ 0,
+ NULL,
+ NULL);
}
// Invoke main, which will be compiled resulting in a compiler event in
@@ -9583,6 +9599,8 @@ TEST_CASE(Timeline_Dart_GlobalTimelineGetTrace) {
EXPECT_SUBSTRING("TRACE_EVENT", buffer);
EXPECT_SUBSTRING("arg0", buffer);
EXPECT_SUBSTRING("value0", buffer);
+ EXPECT_SUBSTRING("METADATA_EVENT", buffer);
+ EXPECT_SUBSTRING("COUNTER_EVENT", buffer);
// Free buffer allocated by AppendStreamConsumer
free(data.buffer);
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/timeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698