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

Unified Diff: tests/compiler/dart2js/serialization/analysis_test_helper.dart

Issue 2156033002: Split out long-running serialization test and add timings to output (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/compilation_test_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/serialization/analysis_test_helper.dart
diff --git a/tests/compiler/dart2js/serialization/analysis_test_helper.dart b/tests/compiler/dart2js/serialization/analysis_test_helper.dart
index 152972bd7cc726e2ce63ee9af167e77fff6ee8e1..4dd03c3e31f9e78573197d7b873027be08326c4e 100644
--- a/tests/compiler/dart2js/serialization/analysis_test_helper.dart
+++ b/tests/compiler/dart2js/serialization/analysis_test_helper.dart
@@ -27,6 +27,7 @@ main(List<String> args) {
} else {
await arguments.forEachTest(serializedData, TESTS, analyze);
}
+ printMeasurementResults();
});
}
@@ -39,27 +40,27 @@ Future analyze(
bool verbose: false}) async {
String testDescription = test != null ? test.name : '${entryPoint}';
String id = index != null ? '$index: ' : '';
- print('------------------------------------------------------------------');
- print('analyze ${id}${testDescription}');
- print('------------------------------------------------------------------');
- DiagnosticCollector diagnosticCollector = new DiagnosticCollector();
- await runCompiler(
- entryPoint: entryPoint,
- resolutionInputs: resolutionInputs,
- memorySourceFiles: sourceFiles,
- options: [Flags.analyzeOnly],
- diagnosticHandler: diagnosticCollector);
- if (test != null) {
- Expect.equals(test.expectedErrorCount, diagnosticCollector.errors.length,
- "Unexpected error count.");
- Expect.equals(
- test.expectedWarningCount,
- diagnosticCollector.warnings.length,
- "Unexpected warning count.");
- Expect.equals(test.expectedHintCount, diagnosticCollector.hints.length,
- "Unexpected hint count.");
- Expect.equals(test.expectedInfoCount, diagnosticCollector.infos.length,
- "Unexpected info count.");
- }
+ String title = '${id}${testDescription}';
+ await measure(title, 'analyze', () async {
+ DiagnosticCollector diagnosticCollector = new DiagnosticCollector();
+ await runCompiler(
+ entryPoint: entryPoint,
+ resolutionInputs: resolutionInputs,
+ memorySourceFiles: sourceFiles,
+ options: [Flags.analyzeOnly],
+ diagnosticHandler: diagnosticCollector);
+ if (test != null) {
+ Expect.equals(test.expectedErrorCount, diagnosticCollector.errors.length,
+ "Unexpected error count.");
+ Expect.equals(
+ test.expectedWarningCount,
+ diagnosticCollector.warnings.length,
+ "Unexpected warning count.");
+ Expect.equals(test.expectedHintCount, diagnosticCollector.hints.length,
+ "Unexpected hint count.");
+ Expect.equals(test.expectedInfoCount, diagnosticCollector.infos.length,
+ "Unexpected info count.");
+ }
+ });
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/compilation_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698