OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library tracer; | 5 library tracer; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:logging/logging.dart'; | 9 import 'package:logging/logging.dart'; |
10 import 'package:observe/observe.dart'; | 10 import 'package:observe/observe.dart'; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 _time.reset(); | 88 _time.reset(); |
89 events.clear(); | 89 events.clear(); |
90 } | 90 } |
91 | 91 |
92 TraceEvent trace(String message, {Map map: null}) { | 92 TraceEvent trace(String message, {Map map: null}) { |
93 var event = new TraceEvent.msg(_time.elapsedMicroseconds, message, map); | 93 var event = new TraceEvent.msg(_time.elapsedMicroseconds, message, map); |
94 events.add(event); | 94 events.add(event); |
95 return event; | 95 return event; |
96 } | 96 } |
97 } | 97 } |
OLD | NEW |