apps,microbench: run ref by default

This commit is contained in:
Zihao Yu 2019-06-13 10:53:40 +08:00
parent 93874f23fe
commit 71202b3d71
1 changed files with 5 additions and 1 deletions

View File

@ -60,7 +60,11 @@ static unsigned long score(Benchmark *b, unsigned long tsc, unsigned long msec)
}
int main(const char *args) {
const char *setting_name = args ? args : "(null)";
const char *setting_name = args;
if (args == NULL || strcmp(args, "") == 0) {
printf("Empty mainargs. Use \"ref\" by default\n");
setting_name = "ref";
}
int setting_id = -1;
if (strcmp(setting_name, "test" ) == 0) setting_id = 0;