source: mainline/uspace/app/hbench/doc/doxygroups.h@ fe656783

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since fe656783 was fe656783, checked in by Vojtech Horky <vojtech.horky@…>, 6 years ago

Rename perf to hbench

The main reason for the rename is that perf (and performance measuring
tool description) suggests that perf is a generic tool for measuring
performance of other applications. But it is actually a set of
benchmarks for measuring internal parts of HelenOS (libc, IPC, etc.).

Furthermore, perf is a well-known program in GNU/Linux world with
completely different purpose and there really is no reason why to
confuse the users.

The new name hopefully better suggests that the tool is a set of
benchmarks for HelenOS (hence the name (H)elenOS (bench)marks).

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[fe656783]1/** @addtogroup hbench hbench
2 * @brief HelenOS user space benchmarks
[d230358]3 * @ingroup apps
[a362c16]4 *
5 * @details
6 *
7 * To add a new benchmark, you need to implement the actual benchmarking
8 * code and register it.
9 *
10 * Registration is done by adding
11 * <code>extern benchmark_t bench_YOUR_NAME</code> reference to benchlist.h
12 * and by adding it to the array in benchlist.c.
13 *
14 * The actual benchmark should reside in a separate file (see malloc/malloc1.c
15 * for example) and has to (at least) declare one function (the actual
16 * benchmark) and fill-in the benchmark_t structure.
17 *
18 * Fill-in the name of the benchmark, its description and a reference to the
19 * benchmark function to the benchmark_t.
20 *
21 * The benchmarking function has to accept for arguments:
22 * @li stopwatch_t: store the measured data there
23 * @li uint64_t: size of the workload - typically number of inner loops in
24 * your benchmark (used to self-calibrate benchmark size)
25 * @li char * and size_t giving you access to buffer for storing error message
26 * if the benchmark fails (return false from the function itself then)
27 *
28 * Typically, the structure of the function is following:
29 * @code{c}
30 * static bool runner(stopwatch_t *stopwatch, uint64_t size,
31 * char *error, size_t error_size)
32 * {
33 * stopwatch_start(stopwatch);
34 * for (uint64_t i = 0; i < size; i++) {
35 * // measured action
36 * }
37 * stopwatch_stop(stopwatch);
38 *
39 * return true;
40 * }
41 * @endcode
[d230358]42 */
Note: See TracBrowser for help on using the repository browser.