| 214 | } |
| 215 | |
| 216 | void 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 | |
| 249 | bool TestPerformance(int argc, char** argv) { |
| 250 | TestPerformance(argc, argv, 32, 32); |
nothing calls this directly
no test coverage detected