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

Unified Diff: pkg/analysis_server/test/integration/integration_tests.dart

Issue 430803003: Add timestamps to integration test output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/test/integration/integration_tests.dart
diff --git a/pkg/analysis_server/test/integration/integration_tests.dart b/pkg/analysis_server/test/integration/integration_tests.dart
index 5e0351a777ac979c21047ca8fc4a4af0d095b8c1..4233704b9a21e53439456f840f1b596c17b13616 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -517,7 +517,14 @@ class Server {
*/
bool _receivedBadDataFromServer = false;
- Server._(this._process);
+ /**
+ * Stopwatch that we use to generate timing information for debug output.
+ */
+ Stopwatch _time = new Stopwatch();
+
+ Server._(this._process) {
+ _time.start();
+ }
/**
* Get a stream which will receive notifications of the given event type.
@@ -702,6 +709,9 @@ class Server {
* [debugStdio] has been called.
*/
void _recordStdio(String line) {
+ double elapsedTime = _time.elapsedTicks.toDouble() /
+ _time.frequency.toDouble();
scheglov 2014/07/30 18:46:15 Do you need toDouble() here? 3 / 2 already gives 1
+ line = "$elapsedTime: $line";
if (_debuggingStdio) {
print(line);
}
« 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