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

Side by Side Diff: pkg/analysis_server/test/performance/instrumentation_input_converter.dart

Issue 1221893003: performance measurement improvements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 input.transformer.instrumentation; 5 library input.transformer.instrumentation;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/src/generated/java_engine.dart'; 9 import 'package:analyzer/src/generated/java_engine.dart';
10 import 'package:analyzer/instrumentation/instrumentation.dart'; 10 import 'package:analyzer/instrumentation/instrumentation.dart';
(...skipping 12 matching lines...) Expand all
23 final Set<String> codesSeen = new Set<String>(); 23 final Set<String> codesSeen = new Set<String>();
24 24
25 /** 25 /**
26 * [readBuffer] holds the contents of the file being read from disk 26 * [readBuffer] holds the contents of the file being read from disk
27 * as recorded in the instrumentation log 27 * as recorded in the instrumentation log
28 * or `null` if not converting a "Read" entry. 28 * or `null` if not converting a "Read" entry.
29 */ 29 */
30 StringBuffer readBuffer = null; 30 StringBuffer readBuffer = null;
31 31
32 InstrumentationInputConverter( 32 InstrumentationInputConverter(
33 String tmpSrcDirPath, Map<String, String> srcPathMap) 33 String tmpSrcDirPath, Map<String, String> srcPathMap,
34 : super(tmpSrcDirPath, srcPathMap); 34 {int diagnosticPort})
35 : super(tmpSrcDirPath, srcPathMap, diagnosticPort: diagnosticPort);
35 36
36 @override 37 @override
37 Operation convert(String line) { 38 Operation convert(String line) {
38 List<String> fields; 39 List<String> fields;
39 try { 40 try {
40 fields = _parseFields(line); 41 fields = _parseFields(line);
41 if (fields.length < 2) { 42 if (fields.length < 2) {
42 if (readBuffer != null) { 43 if (readBuffer != null) {
43 readBuffer.writeln(fields.length == 1 ? fields[0] : ''); 44 readBuffer.writeln(fields.length == 1 ? fields[0] : '');
44 return null; 45 return null;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 sb.writeCharCode(code); 141 sb.writeCharCode(code);
141 } 142 }
142 ++index; 143 ++index;
143 } 144 }
144 if (sb.isNotEmpty) { 145 if (sb.isNotEmpty) {
145 fields.add(sb.toString()); 146 fields.add(sb.toString());
146 } 147 }
147 return fields; 148 return fields;
148 } 149 }
149 } 150 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/performance/input_converter.dart ('k') | pkg/analysis_server/test/performance/local_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698