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

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

Issue 1834423002: Sort the files in analysis_server (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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.log_file; 5 library input.transformer.log_file;
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:logging/logging.dart'; 10 import 'package:logging/logging.dart';
11 11
12 import 'input_converter.dart'; 12 import 'input_converter.dart';
13 import 'operation.dart'; 13 import 'operation.dart';
14 14
15 const CONNECTED_MSG_FRAGMENT = ' <= {"event":"server.connected"'; 15 const CONNECTED_MSG_FRAGMENT = ' <= {"event":"server.connected"';
16 final int NINE = '9'.codeUnitAt(0);
17 const RECEIVED_FRAGMENT = ' <= {'; 16 const RECEIVED_FRAGMENT = ' <= {';
18 const SENT_FRAGMENT = ' => {'; 17 const SENT_FRAGMENT = ' => {';
18 final int NINE = '9'.codeUnitAt(0);
19 final int ZERO = '0'.codeUnitAt(0); 19 final int ZERO = '0'.codeUnitAt(0);
20 20
21 /** 21 /**
22 * [LogFileInputConverter] converts a log file stream 22 * [LogFileInputConverter] converts a log file stream
23 * into a series of operations to be sent to the analysis server. 23 * into a series of operations to be sent to the analysis server.
24 */ 24 */
25 class LogFileInputConverter extends CommonInputConverter { 25 class LogFileInputConverter extends CommonInputConverter {
26 LogFileInputConverter(String tmpSrcDirPath, PathMap srcPathMap) 26 LogFileInputConverter(String tmpSrcDirPath, PathMap srcPathMap)
27 : super(tmpSrcDirPath, srcPathMap); 27 : super(tmpSrcDirPath, srcPathMap);
28 28
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 while (index < line.length) { 75 while (index < line.length) {
76 int code = line.codeUnitAt(index); 76 int code = line.codeUnitAt(index);
77 if (code < ZERO || NINE < code) { 77 if (code < ZERO || NINE < code) {
78 return line.substring(0, index); 78 return line.substring(0, index);
79 } 79 }
80 ++index; 80 ++index;
81 } 81 }
82 return line; 82 return line;
83 } 83 }
84 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698