Changeset ebb0835 in mainline for uspace/app/hbench/hbench.h
- Timestamp:
- 2019-01-07T12:56:22Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c2db02a
- Parents:
- a787081
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/hbench/hbench.h
ra787081 rebb0835 41 41 #include <perf.h> 42 42 43 typedef bool (*benchmark_entry_t)(stopwatch_t *, uint64_t, 43 /* 44 * So far, a simple wrapper around system stopwatch. 45 * Eventually, we could collection of hardware counters etc. without 46 * modifying signatures of any existing benchmark. 47 */ 48 typedef struct { 49 stopwatch_t stopwatch; 50 } benchmeter_t; 51 52 static inline void benchmeter_init(benchmeter_t *meter) 53 { 54 stopwatch_init(&meter->stopwatch); 55 } 56 57 static inline void benchmeter_start(benchmeter_t *meter) 58 { 59 stopwatch_start(&meter->stopwatch); 60 } 61 62 static inline void benchmeter_stop(benchmeter_t *meter) 63 { 64 stopwatch_stop(&meter->stopwatch); 65 } 66 67 typedef bool (*benchmark_entry_t)(benchmeter_t *, uint64_t, 44 68 char *, size_t); 45 69 typedef bool (*benchmark_helper_t)(char *, size_t); … … 57 81 58 82 extern errno_t csv_report_open(const char *); 59 extern void csv_report_add_entry( stopwatch_t *, int, benchmark_t *, uint64_t);83 extern void csv_report_add_entry(benchmeter_t *, int, benchmark_t *, uint64_t); 60 84 extern void csv_report_close(void); 61 85
Note:
See TracChangeset
for help on using the changeset viewer.