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


Ignore:
Timestamp:
2019-01-07T12:56:22Z (5 years ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c2db02a
Parents:
a787081
Message:

hbench: add tiny wrapper around stopwatch_t

This prepares the harness for future extensions when more than wallclock
time would be prepared. The data would be stored inside the new
structure and the actual benchmarks would not need to be modified at all
(they really should not care which metrics are collected).

File:
1 edited

Legend:

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

    ra787081 rebb0835  
    4343 * that the corresponding blocks would be cached after first run.
    4444 */
    45 static bool runner(stopwatch_t *stopwatch, uint64_t size,
     45static bool runner(benchmeter_t *meter, uint64_t size,
    4646    char *error, size_t error_size)
    4747{
    4848        const char *path = bench_param_get("dirname", "/");
    4949
    50         stopwatch_start(stopwatch);
     50        benchmeter_start(meter);
    5151        for (uint64_t i = 0; i < size; i++) {
    5252                DIR *dir = opendir(path);
     
    6464                closedir(dir);
    6565        }
    66         stopwatch_stop(stopwatch);
     66        benchmeter_stop(meter);
    6767
    6868        return true;
Note: See TracChangeset for help on using the changeset viewer.