Changeset e7f9a09 in mainline for uspace/app/hbench/fs/dirread.c


Ignore:
Timestamp:
2019-01-21T13:20:31Z (5 years ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d17cf8c
Parents:
94ebebf
Message:

hbench: less parameters to benchmark runners

Merge stopwatch as well as error message buffer into one structure to
simplify benchmark runner signature.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/hbench/fs/dirread.c

    r94ebebf re7f9a09  
    4444 * that the corresponding blocks would be cached after first run.
    4545 */
    46 static bool runner(benchmeter_t *meter, uint64_t size,
    47     char *error, size_t error_size)
     46static bool runner(bench_run_t *run, uint64_t size)
    4847{
    4948        const char *path = bench_param_get("dirname", "/");
    5049
    51         benchmeter_start(meter);
     50        bench_run_start(run);
    5251        for (uint64_t i = 0; i < size; i++) {
    5352                DIR *dir = opendir(path);
    5453                if (dir == NULL) {
    55                         snprintf(error, error_size, "failed to open %s for reading: %s",
     54                        return bench_run_fail(run, "failed to open %s for reading: %s",
    5655                            path, str_error(errno));
    57                         return false;
    5856                }
    5957
     
    6563                closedir(dir);
    6664        }
    67         benchmeter_stop(meter);
     65        bench_run_stop(run);
    6866
    6967        return true;
Note: See TracChangeset for help on using the changeset viewer.