MCPcopy Create free account
hub / github.com/Blizzard/s2client-api / TestPerformance

Function TestPerformance

tests/test_performance.cc:216–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void TestPerformance(int argc, char** argv, int feature_layer_width, int feature_layer_height) {
217
218 sc2::Coordinator coordinator;
219 if (!coordinator.LoadSettings(argc, argv)) {
220 return;
221 }
222
223 PerformanceTests performance_tests(feature_layer_width, feature_layer_height);
224
225 FeatureLayerSettings settings;
226 settings.map_x = feature_layer_height;
227 settings.map_y = feature_layer_width;
228 settings.minimap_x = feature_layer_height;
229 settings.minimap_x = feature_layer_width;
230 coordinator.SetFeatureLayers(settings);
231
232 coordinator.SetParticipants({
233 CreateParticipant(Race::Protoss, &performance_tests),
234 CreateComputer(Race::Zerg)
235 });
236
237 coordinator.LaunchStarcraft();
238
239 performance_tests.PreGamePing();
240
241 coordinator.StartGame(sc2::kMapEmpty);
242
243 // Step forward the game simulation.
244 while (!performance_tests.IsFinished()) {
245 coordinator.Update();
246 }
247}
248
249bool TestPerformance(int argc, char** argv) {
250 TestPerformance(argc, argv, 32, 32);

Callers

nothing calls this directly

Calls 10

CreateParticipantFunction · 0.85
CreateComputerFunction · 0.85
LoadSettingsMethod · 0.80
SetFeatureLayersMethod · 0.80
SetParticipantsMethod · 0.80
LaunchStarcraftMethod · 0.80
PreGamePingMethod · 0.80
StartGameMethod · 0.80
UpdateMethod · 0.80
IsFinishedMethod · 0.45

Tested by

no test coverage detected