Barrelfish
Functions
bench.c File Reference

Bench library initialization. More...

Functions

void bench_init (void)
 Initialize benchmarking library. More...
 
cycles_t bench_tscoverhead (void)
 
cycles_t bench_time_diff (cycles_t tsc_start, cycles_t tsc_end)
 computes the differences of two time stamps with respecting overflow More...
 
cycles_t bench_avg (cycles_t *array, size_t len)
 Compute averages. More...
 
cycles_t bench_variance (cycles_t *array, size_t len)
 Compute variance. More...
 
void bench_stddev (cycles_t *array, size_t len, uint8_t correction, cycles_t *ret_avg, cycles_t *ret_stddev)
 computes the standard deviation s^2 of the sample data More...
 
cycles_t bench_min (cycles_t *array, size_t len)
 Compute minimum. More...
 
cycles_t bench_max (cycles_t *array, size_t len)
 Compute maximum. More...
 

Detailed Description

Bench library initialization.

Function Documentation

cycles_t bench_avg ( cycles_t array,
size_t  len 
)

Compute averages.

If certain datapoints should be ignored, they should be marked with #BENCH_IGNORE_WATERMARK

void bench_init ( void  )

Initialize benchmarking library.

cycles_t bench_max ( cycles_t array,
size_t  len 
)

Compute maximum.

If certain datapoints should be ignored, they should be marked with #BENCH_IGNORE_WATERMARK

cycles_t bench_min ( cycles_t array,
size_t  len 
)

Compute minimum.

If certain datapoints should be ignored, they should be marked with #BENCH_IGNORE_WATERMARK

void bench_stddev ( cycles_t array,
size_t  len,
uint8_t  correction,
cycles_t ret_avg,
cycles_t ret_stddev 
)

computes the standard deviation s^2 of the sample data

Parameters
arrayarray of data to analyze
lensize of the array
correctionapply Bessel's correction (using N-1 instead of N)
ret_avgreturns the average of the sample
ret_stddevreturns the standard deviation squared of the sample

discard some initiali observations

cycles_t bench_time_diff ( cycles_t  tsc_start,
cycles_t  tsc_end 
)

computes the differences of two time stamps with respecting overflow

This function also accounts for the overhead when taking timestamps

Parameters
tsc_starttimestamp of start
tsc_endtimestamp of end
Returns
elaped cycles
cycles_t bench_tscoverhead ( void  )

Return the measured tsc overhead

cycles_t bench_variance ( cycles_t array,
size_t  len 
)

Compute variance.

If certain datapoints should be ignored, they should be marked with #BENCH_IGNORE_WATERMARK