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

Side by Side Diff: pkg/analyzer/lib/src/generated/source_io.dart

Issue 784623004: Remove old instrumentation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/scanner.dart ('k') | pkg/analyzer/test/enum_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.source.io; 8 library engine.source.io;
9 9
10 import 'engine.dart'; 10 import 'engine.dart';
11 import 'instrumentation.dart';
12 import 'java_core.dart'; 11 import 'java_core.dart';
13 import 'java_engine.dart'; 12 import 'java_engine.dart';
14 import 'java_io.dart'; 13 import 'java_io.dart';
15 import 'source.dart'; 14 import 'source.dart';
16 import 'utilities_general.dart'; 15 import 'utilities_general.dart';
17 16
18 export 'source.dart'; 17 export 'source.dart';
19 18
20 /** 19 /**
21 * Instances of the class [DirectoryBasedSourceContainer] represent a source con tainer that 20 * Instances of the class [DirectoryBasedSourceContainer] represent a source con tainer that
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 if (file == null) { 228 if (file == null) {
230 return "<unknown source>"; 229 return "<unknown source>";
231 } 230 }
232 return file.getAbsolutePath(); 231 return file.getAbsolutePath();
233 } 232 }
234 233
235 /** 234 /**
236 * Record the time the IO took if it was slow 235 * Record the time the IO took if it was slow
237 */ 236 */
238 void _reportIfSlowIO(int nanos) { 237 void _reportIfSlowIO(int nanos) {
239 //If slower than 10ms 238 // TODO(brianwilkerson) Decide whether we still want to capture this data.
240 if (nanos > 10 * TimeCounter.NANOS_PER_MILLI) { 239 // //If slower than 10ms
241 InstrumentationBuilder builder = Instrumentation.builder2("SlowIO"); 240 // if (nanos > 10 * TimeCounter.NANOS_PER_MILLI) {
242 try { 241 // InstrumentationBuilder builder = Instrumentation.builder2("SlowIO");
243 builder.data3("fileName", fullName); 242 // try {
244 builder.metric2("IO-Time-Nanos", nanos); 243 // builder.data3("fileName", fullName);
245 } finally { 244 // builder.metric2("IO-Time-Nanos", nanos);
246 builder.log(); 245 // } finally {
247 } 246 // builder.log();
248 } 247 // }
248 // }
249 } 249 }
250 } 250 }
251 251
252 /** 252 /**
253 * Instances of the class `FileUriResolver` resolve `file` URI's. 253 * Instances of the class `FileUriResolver` resolve `file` URI's.
254 */ 254 */
255 class FileUriResolver extends UriResolver { 255 class FileUriResolver extends UriResolver {
256 /** 256 /**
257 * The name of the `file` scheme. 257 * The name of the `file` scheme.
258 */ 258 */
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 } 533 }
534 534
535 /** 535 /**
536 * Return `true` if the given URI is a `file` URI. 536 * Return `true` if the given URI is a `file` URI.
537 * 537 *
538 * @param uri the URI being tested 538 * @param uri the URI being tested
539 * @return `true` if the given URI is a `file` URI 539 * @return `true` if the given URI is a `file` URI
540 */ 540 */
541 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; 541 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
542 } 542 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/scanner.dart ('k') | pkg/analyzer/test/enum_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698