MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / detectOutputFormat

Method detectOutputFormat

src/arguments.cpp:514–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514Output Arguments::detectOutputFormat(const char* file) {
515 const char* ext = strrchr(file, '.');
516 if (ext != NULL) {
517 if (strcmp(ext, ".html") == 0) {
518 return OUTPUT_FLAMEGRAPH;
519 } else if (strcmp(ext, ".jfr") == 0) {
520 return OUTPUT_JFR;
521 } else if (strcmp(ext, ".collapsed") == 0 || strcmp(ext, ".folded") == 0) {
522 return OUTPUT_COLLAPSED;
523 } else if (strcmp(ext, ".svg") == 0) {
524 return OUTPUT_SVG;
525 }
526 }
527 return OUTPUT_TEXT;
528}
529
530long Arguments::parseUnits(const char* str, const Multiplier* multipliers) {
531 char* end;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected