@@ -23,6 +23,7 @@ const int chromeDebugPort = 10000;
2323typedef  WebBenchmarkOptions  =  ({
2424  String  webRenderer,
2525  bool  useWasm,
26+   bool  forceSingleThreadedSkwasm,
2627});
2728
2829Future <TaskResult > runWebBenchmark (WebBenchmarkOptions  benchmarkOptions) async  {
@@ -142,8 +143,9 @@ Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
142143      final  bool  isUncalibratedSmokeTest =  io.Platform .environment['CALIBRATED' ] !=  'true' ;
143144      // final bool isUncalibratedSmokeTest = 
144145      //     io.Platform.environment['UNCALIBRATED_SMOKE_TEST'] == 'true'; 
146+       final  String  urlParams =  benchmarkOptions.forceSingleThreadedSkwasm ?  '?force_st=true'  :  '' ;
145147      final  ChromeOptions  options =  ChromeOptions (
146-         url:  'http://localhost:$benchmarkServerPort /index.html' ,
148+         url:  'http://localhost:$benchmarkServerPort /index.html$ urlParams ' ,
147149        userDataDirectory:  userDataDir,
148150        headless:  isUncalibratedSmokeTest,
149151        debugPort:  chromeDebugPort,
@@ -171,7 +173,13 @@ Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
171173          throw  'Benchmark name is empty' ;
172174        }
173175
174-         final  String  namespace =  '$benchmarkName .${benchmarkOptions .webRenderer }' ;
176+         final  String  webRendererName;
177+         if  (benchmarkOptions.useWasm &&  benchmarkOptions.forceSingleThreadedSkwasm) {
178+           webRendererName =  'skwasm_st' ;
179+         } else  {
180+           webRendererName =  benchmarkOptions.webRenderer;
181+         }
182+         final  String  namespace =  '$benchmarkName .$webRendererName ' ;
175183        final  List <String > scoreKeys =  List <String >.from (profile['scoreKeys' ] as  List <dynamic >);
176184        if  (scoreKeys.isEmpty) {
177185          throw  'No score keys in benchmark "$benchmarkName "' ;
0 commit comments