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

Side by Side Diff: pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart

Issue 1249793007: performance measurement mods: (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, PathMap srcPathMap)
34 {int diagnosticPort}) 34 : super(tmpSrcDirPath, srcPathMap);
35 : super(tmpSrcDirPath, srcPathMap, diagnosticPort: diagnosticPort);
36 35
37 @override 36 @override
38 Operation convert(String line) { 37 Operation convert(String line) {
39 List<String> fields; 38 List<String> fields;
40 try { 39 try {
41 fields = _parseFields(line); 40 fields = _parseFields(line);
42 if (fields.length < 2) { 41 if (fields.length < 2) {
43 if (readBuffer != null) { 42 if (readBuffer != null) {
44 readBuffer.writeln(fields.length == 1 ? fields[0] : ''); 43 readBuffer.writeln(fields.length == 1 ? fields[0] : '');
45 return null; 44 return null;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 sb.writeCharCode(code); 140 sb.writeCharCode(code);
142 } 141 }
143 ++index; 142 ++index;
144 } 143 }
145 if (sb.isNotEmpty) { 144 if (sb.isNotEmpty) {
146 fields.add(sb.toString()); 145 fields.add(sb.toString());
147 } 146 }
148 return fields; 147 return fields;
149 } 148 }
150 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698