1 #ifndef _PERFTESTS_H_
2 #define _PERFTESTS_H_
3 
4 #include <stddef.h>
5 #include <stdint.h>
6 
7 /**
8  * perftest_buffers(nbytes, sizes, nsizes, nbytes_warmup, cputime,
9  *     init_func, func, clean_func, cookie):
10  * Time using ${func} to process ${nbytes} bytes in blocks of ${sizes}.
11  * Before timing any block sizes, process ${nbytes_warmup} bytes with the
12  * maximum size in ${sizes}.  If ${cputime} is non-zero, attempt to use
13  * cpu time rather than wall-clock time.  Invoke callback functions as:
14  *     init_func(cookie, buffer, buflen)
15  *     func(cookie, buffer, buflen, nbuffers)
16  *     clean_func(cookie)
17  * where ${buffer} is large enough to hold the maximum buffer size.  Print
18  * the time and speed of processing each buffer size.  ${init_func} and
19  * ${clean_func} may be NULL.  If ${init_func} has completed successfully,
20  * then ${clean_func} will be called if there is a subsequent error.
21  */
22 int perftest_buffers(size_t, const size_t *, size_t, size_t, int,
23     int (*)(void *, uint8_t *, size_t),
24     int (*)(void *, uint8_t *, size_t, size_t),
25     int (*)(void *), void *);
26 
27 #endif /* !_PERFTESTS_H_ */
28