Chromium Code Reviews| Index: pkg/analyzer/lib/instrumentation/instrumentation.dart |
| diff --git a/pkg/analyzer/lib/instrumentation/instrumentation.dart b/pkg/analyzer/lib/instrumentation/instrumentation.dart |
| index c3a9920bd5a1fa89c2b53cc62a440de245be64a7..2d57d621a838950c701449d75c821bf70cec37d3 100644 |
| --- a/pkg/analyzer/lib/instrumentation/instrumentation.dart |
| +++ b/pkg/analyzer/lib/instrumentation/instrumentation.dart |
| @@ -76,6 +76,12 @@ class InstrumentationService { |
| InstrumentationService(this._instrumentationServer); |
| /** |
| + * Return true if this [InstrumentationService] was initialized with a |
|
Brian Wilkerson
2015/01/13 22:33:29
nit: "true" --> "`true`", "null" --> "`null`"
Paul Berry
2015/01/14 18:23:03
Done.
|
| + * non-null server (and hence instrumentation is active). |
| + */ |
| + bool get isActive => _instrumentationServer != null; |
| + |
| + /** |
| * The current time, expressed as a decimal encoded number of milliseconds. |
| */ |
| String get _timestamp => new DateTime.now().millisecondsSinceEpoch.toString(); |
| @@ -106,7 +112,8 @@ class InstrumentationService { |
| void logFileRead(String path, int modificationTime, String content) { |
| if (_instrumentationServer != null) { |
|
Brian Wilkerson
2015/01/13 22:33:29
We should replace existing tests of this form with
Paul Berry
2015/01/14 18:23:03
Agreed. I'll do a follow-up CL.
|
| String timeStamp = _toString(modificationTime); |
| - _instrumentationServer.log(_join([TAG_FILE_READ, path, timeStamp, content])); |
| + _instrumentationServer.log( |
| + _join([TAG_FILE_READ, path, timeStamp, content])); |
| } |
| } |
| @@ -117,7 +124,8 @@ class InstrumentationService { |
| */ |
| void logLogEntry(String level, DateTime time, String message) { |
| if (_instrumentationServer != null) { |
| - String timeStamp = time == null ? 'null' : time.millisecondsSinceEpoch.toString(); |
| + String timeStamp = |
| + time == null ? 'null' : time.millisecondsSinceEpoch.toString(); |
| _instrumentationServer.log( |
| _join([TAG_LOG_ENTRY, level, timeStamp, message])); |
| } |