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

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

Issue 1310263003: Reformat code to minimize churn (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 11 matching lines...) Expand all
22 class InstrumentationInputConverter extends CommonInputConverter { 22 class InstrumentationInputConverter extends CommonInputConverter {
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(String tmpSrcDirPath, PathMap srcPathMap)
33 String tmpSrcDirPath, PathMap srcPathMap)
34 : super(tmpSrcDirPath, srcPathMap); 33 : super(tmpSrcDirPath, srcPathMap);
35 34
36 @override 35 @override
37 Operation convert(String line) { 36 Operation convert(String line) {
38 List<String> fields; 37 List<String> fields;
39 try { 38 try {
40 fields = _parseFields(line); 39 fields = _parseFields(line);
41 if (fields.length < 2) { 40 if (fields.length < 2) {
42 if (readBuffer != null) { 41 if (readBuffer != null) {
43 readBuffer.writeln(fields.length == 1 ? fields[0] : ''); 42 readBuffer.writeln(fields.length == 1 ? fields[0] : '');
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 sb.writeCharCode(code); 139 sb.writeCharCode(code);
141 } 140 }
142 ++index; 141 ++index;
143 } 142 }
144 if (sb.isNotEmpty) { 143 if (sb.isNotEmpty) {
145 fields.add(sb.toString()); 144 fields.add(sb.toString());
146 } 145 }
147 return fields; 146 return fields;
148 } 147 }
149 } 148 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/benchmark/integration/driver.dart ('k') | pkg/analysis_server/benchmark/integration/local_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698