MCPcopy Create free account
hub / github.com/FastLED/FastLED / main

Function main

tests/profile/json_performance.cpp:227–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227int main(int argc, char* argv[]) {
228 const char* mode = "small"; // Default mode
229
230 if (argc > 1) {
231 mode = argv[1];
232 }
233
234 bool success = true;
235
236 if (fl::strcmp(mode, "small") == 0) {
237 success = run_small_benchmark();
238 } else if (fl::strcmp(mode, "large") == 0) {
239 success = run_large_benchmark();
240 } else if (fl::strcmp(mode, "all") == 0) {
241 success = run_small_benchmark() && run_large_benchmark();
242 } else if (fl::strcmp(mode, "help") == 0 || fl::strcmp(mode, "--help") == 0 || fl::strcmp(mode, "-h") == 0) {
243 print_usage();
244 return 0;
245 } else {
246 printf("Unknown mode: %s\n\n", mode);
247 print_usage();
248 return 1;
249 }
250
251 return success ? 0 : 1;
252}

Callers

nothing calls this directly

Calls 5

strcmpFunction · 0.85
printfFunction · 0.85
run_small_benchmarkFunction · 0.70
run_large_benchmarkFunction · 0.70
print_usageFunction · 0.70

Tested by

no test coverage detected