[analysis_server] fix benchmark tests
Fixes #51207 Change-Id: I3bd20fa283ed60cfd3610edfc517a3872206f654 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280260 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
committed by
Commit Queue
parent
cb9ff115b4
commit
2bc3d0ef6e
@@ -17,6 +17,7 @@ import 'memory_tests.dart';
|
||||
/// - analysis-server-completion
|
||||
class AnalysisBenchmark extends Benchmark {
|
||||
final AbstractBenchmarkTest Function() testConstructor;
|
||||
|
||||
AnalysisBenchmark(ServerBenchmark benchmarkTest)
|
||||
: testConstructor = benchmarkTest.testConstructor,
|
||||
super(
|
||||
@@ -67,7 +68,7 @@ class AnalysisBenchmark extends Benchmark {
|
||||
const kGroupCount = 10;
|
||||
|
||||
var filePath =
|
||||
path.join(analysisServerSrcPath, 'lib/src/analysis_server.dart');
|
||||
path.join(analysisServerSrcPath, 'lib', 'src', 'analysis_server.dart');
|
||||
var contents = File(filePath).readAsStringSync();
|
||||
|
||||
await test.openFile(filePath, contents);
|
||||
@@ -112,7 +113,7 @@ class AnalysisBenchmark extends Benchmark {
|
||||
const kGroupCount = 5;
|
||||
|
||||
var filePath =
|
||||
path.join(analysisServerSrcPath, 'lib/src/analysis_server.dart');
|
||||
path.join(analysisServerSrcPath, 'lib', 'src', 'analysis_server.dart');
|
||||
var contents = File(filePath).readAsStringSync();
|
||||
|
||||
// Get the future for `analysisFinished` *before* the call to [openFile]
|
||||
@@ -147,6 +148,7 @@ class AnalysisBenchmark extends Benchmark {
|
||||
/// - analysis-server-cold-memory
|
||||
class ColdAnalysisBenchmark extends Benchmark {
|
||||
final AbstractBenchmarkTest Function() testConstructor;
|
||||
|
||||
ColdAnalysisBenchmark(ServerBenchmark benchmarkTest)
|
||||
: testConstructor = benchmarkTest.testConstructor,
|
||||
super(
|
||||
|
||||
Reference in New Issue
Block a user