Measurement framework is ready for testing.

- New, expanded API.
 - Calculations moved into plugins.
 - Scripts using measurement framework ported.
 - Updated the script-land queue implementation to make it more generic.
 -
This commit is contained in:
Seth Hall 2013-04-01 17:04:15 -04:00
parent 93eca70e6b
commit b477d2b02d
11 changed files with 183 additions and 186 deletions

View file

@ -255,6 +255,11 @@ function reset(m: Measurement)
function create(m: Measurement)
{
if ( (m?$threshold || m?$threshold_series) && ! m?$threshold_val )
{
Reporter::error("Measurement given a threshold with no $threshold_val function");
}
if ( ! m?$id )
m$id=unique_id("");
local tmp: table[Key] of Thresholding = table();
@ -365,9 +370,6 @@ function threshold_crossed(m: Measurement, key: Key, result: Result)
if ( ! m?$threshold_crossed )
return;
#if ( val?$sample_queue )
# val$samples = Queue::get_str_vector(val$sample_queue);
# Add in the extra ResultVals to make threshold_crossed callbacks easier to write.
if ( |m$reducers| != |result| )
{