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

Unified Diff: pkg/analysis_server/test/performance/operation.dart

Issue 1221893003: performance measurement improvements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 6 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 | « pkg/analysis_server/test/performance/main.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/performance/operation.dart
diff --git a/pkg/analysis_server/test/performance/operation.dart b/pkg/analysis_server/test/performance/operation.dart
index 641cf31544b1343a1278e665930c33e90ff1f957..f9ee62a676aca7661bd3f05696a677dba58442f3 100644
--- a/pkg/analysis_server/test/performance/operation.dart
+++ b/pkg/analysis_server/test/performance/operation.dart
@@ -13,7 +13,7 @@ import 'driver.dart';
import 'input_converter.dart';
/**
- * A [CompletionRequestOperation] tracks response time along with
+ * A [CompletionRequestOperation] tracks response time along with
* the first and last completion notifications.
*/
class CompletionRequestOperation extends RequestOperation {
@@ -80,6 +80,7 @@ class RequestOperation extends Operation {
Stopwatch stopwatch = new Stopwatch();
String originalId = json['id'];
String method = json['method'];
+ json['clientRequestTime'] = new DateTime.now().millisecondsSinceEpoch;
driver.logger.log(Level.FINE, 'Sending request: $method\n $json');
stopwatch.start();
@@ -178,9 +179,13 @@ class ResponseOperation extends Operation {
}
class StartServerOperation extends Operation {
+ final int diagnosticPort;
+
+ StartServerOperation({this.diagnosticPort});
+
@override
Future perform(Driver driver) {
- return driver.startServer();
+ return driver.startServer(diagnosticPort: diagnosticPort);
}
}
@@ -194,7 +199,6 @@ class WaitForAnalysisCompleteOperation extends Operation {
Completer completer = new Completer();
bool isAnalyzing = false;
subscription = driver.onServerStatus.listen((ServerStatusParams params) {
- // TODO (danrubel) ensure that server.setSubscriptions STATUS is set
if (params.analysis != null) {
if (params.analysis.isAnalyzing) {
isAnalyzing = true;
@@ -218,10 +222,10 @@ class WaitForAnalysisCompleteOperation extends Operation {
completer.complete();
return;
}
- // Timeout if no communcation received within the last 10 seconds.
+ // Timeout if no communcation received within the last 60 seconds.
double currentTime = driver.server.currentElapseTime;
double lastTime = driver.server.lastCommunicationTime;
- if (currentTime - lastTime > 10) {
+ if (currentTime - lastTime > 60) {
subscription.cancel();
timer.cancel();
String message = 'gave up waiting for analysis to complete';
« no previous file with comments | « pkg/analysis_server/test/performance/main.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698