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

Unified Diff: sky/framework/fn.dart

Issue 1028243003: Let Dart code running in Sky add events to the trace timeline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: more Created 5 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 | « sky/framework/components/fixed_height_scrollable.dart ('k') | sky/framework/tracing.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/fn.dart
diff --git a/sky/framework/fn.dart b/sky/framework/fn.dart
index efb3ac238a58647521b8721e3dd64a82a1181cd9..44e26204f84ec21c4637a1cd82cff88f87ead7b1 100644
--- a/sky/framework/fn.dart
+++ b/sky/framework/fn.dart
@@ -9,6 +9,8 @@ import 'dart:collection';
import 'dart:sky' as sky;
import 'reflect.dart' as reflect;
+final sky.Tracing _tracing = sky.window.tracing;
+
bool _initIsInCheckedMode() {
String testFn(i) { double d = i; return d.toString(); }
try {
@@ -713,8 +715,9 @@ List<Component> _dirtyComponents = new List<Component>();
bool _buildScheduled = false;
bool _inRenderDirtyComponents = false;
-
void _buildDirtyComponents() {
+ _tracing.begin('fn::_buildDirtyComponents');
+
Stopwatch sw;
if (_shouldLogRenderDuration)
sw = new Stopwatch()..start();
@@ -737,8 +740,10 @@ void _buildDirtyComponents() {
if (_shouldLogRenderDuration) {
sw.stop();
- print("Render took ${sw.elapsedMicroseconds} microseconds");
+ print('Render took ${sw.elapsedMicroseconds} microseconds');
}
+
+ _tracing.end('fn::_buildDirtyComponents');
}
void _scheduleComponentForRender(Component c) {
« no previous file with comments | « sky/framework/components/fixed_height_scrollable.dart ('k') | sky/framework/tracing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698