Method Tools.Shoot.run_sync()


Method run_sync

mapping(string:int|float|string) run_sync(Test test, int maximum_seconds, __deprecated__(float)|void overhead)

Description

Run a single benchmark test in the current process and return the result as a mapping.

Parameter test

Benchmark to run.

Parameter maximum_seconds

Number of seconds to run the test before terminating it.

Parameter overhead

Ignored, obsolete.

Returns

Returns a mapping with the following fields on success:

"time" : float

Actual number of seconds that the test ran.

"loops" : int

Number of times that the test ran.

"n" : int

Number of sub tests that were run.

"readable" : string

Description of the test result.

"n_over_time" : int

Number of sub tests per second.

"n_over_time_variance" : float

Variance of sub tests per second.

On benchmark failure a mapping with the single entry "readable" set to "FAIL" is returned.

Note

This is the function that is called by run_sub().

See also

run(), run_sub(), tests()