Changeset 1433ecda in mainline for uspace/app/bnchmark
- Timestamp:
- 2018-04-04T15:42:37Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- File:
-
- 1 edited
-
uspace/app/bnchmark/bnchmark.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bnchmark/bnchmark.c
r47b2d7e3 r1433ecda 55 55 #define MBYTE (1024*1024) 56 56 57 typedef errno_t (*measure_func_t)(void *);57 typedef errno_t (*measure_func_t)(void *); 58 58 typedef unsigned long umseconds_t; /* milliseconds */ 59 59 60 60 static void syntax_print(void); 61 61 62 static errno_t measure(measure_func_t fn, void *data, umseconds_t *result)62 static errno_t measure(measure_func_t fn, void *data, umseconds_t *result) 63 63 { 64 64 struct timeval start_time; … … 155 155 156 156 // Skip program name 157 --argc; ++argv; 157 --argc; 158 ++argv; 158 159 159 160 iterations = strtol(*argv, &endptr, 10); … … 164 165 } 165 166 166 --argc; ++argv; 167 --argc; 168 ++argv; 167 169 test_type = *argv; 168 170 169 --argc; ++argv; 171 --argc; 172 ++argv; 170 173 log_str = *argv; 171 174 172 --argc; ++argv; 175 --argc; 176 ++argv; 173 177 path = *argv; 174 178 175 179 if (str_cmp(test_type, "sequential-file-read") == 0) { 176 180 fn = sequential_read_file; 177 } 178 else if (str_cmp(test_type, "sequential-dir-read") == 0) { 181 } else if (str_cmp(test_type, "sequential-dir-read") == 0) { 179 182 fn = sequential_read_dir; 180 } 181 else { 183 } else { 182 184 fprintf(stderr, "Error, unknown test type\n"); 183 185 syntax_print();
Note:
See TracChangeset
for help on using the changeset viewer.
