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

Unified Diff: pkg/analysis_server/benchmark/perf/memory_tests.dart

Issue 2150033002: Print min/max element in memory benchmarks. (Closed) Base URL: git@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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/benchmark/perf/memory_tests.dart
diff --git a/pkg/analysis_server/benchmark/perf/memory_tests.dart b/pkg/analysis_server/benchmark/perf/memory_tests.dart
index e9c2c338b50274150278158eef7f289878068386..a648344bee4608cbac2e1dd26b94cea82be1892b 100644
--- a/pkg/analysis_server/benchmark/perf/memory_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/memory_tests.dart
@@ -5,6 +5,7 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
+import 'dart:math';
import 'package:analysis_server/plugin/protocol/protocol.dart';
import 'package:unittest/unittest.dart';
@@ -12,9 +13,13 @@ import 'package:unittest/unittest.dart';
import '../../test/integration/integration_tests.dart';
void printMemoryResults(String id, String description, List<int> sizes) {
+ int minMemory = sizes.fold(sizes.first, min);
+ int maxMemory = sizes.fold(sizes.first, max);
String now = new DateTime.now().toUtc().toIso8601String();
print('$now ========== $id');
print('memory: $sizes');
+ print('min_memory: $minMemory');
+ print('max_memory: $maxMemory');
print(description.trim());
print('--------------------');
print('');
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698