Internals¶
funkload.TestRunner
– TestRunner¶
funkload.BenchRunner
– BenchRunner¶
FunkLoad Bench runner.
$Id: BenchRunner.py 24746 2005-08-31 09:59:27Z bdelbosc $
-
class
funkload.BenchRunner.
BenchRunner
(module_file, class_name, method_name, options)¶ Run a unit test in bench mode.
-
addThreads
(number_of_threads)¶ Adds new threads to existing list. Used to dynamically add new threads during a debug bench run.
-
createThreads
(cycle, number_of_threads)¶ Creates number_of_threads threads and returns as a list.
NOTE: This method is not thread safe. Thread safety must be handled by the caller.
-
deleteThreads
(number_of_threads)¶ Stops given number of threads and deletes from thread list.
NOTE: This method is not thread safe. Thread safety must be handled by the caller.
-
dumpThreads
()¶ Display all different traceback of Threads for debugging.
Require threadframe module.
-
getMonitorsConfig
()¶ Get monitors configuration from hosts
-
logging
()¶ Log activity during duration.
-
logr
(message)¶ Log to the test result file.
-
logr_close
()¶ Stop logging tag.
-
logr_open
()¶ Start logging tag.
-
removeThreads
(number_of_threads)¶ Removes threads. Used to dynamically remove threads during a debug bench run.
-
run
()¶ Run all the cycles.
return 0 on success, 1 if there were some failures and -1 on errors.
-
startMonitors
(monitor_key)¶ Start monitoring on hosts list.
-
startThreads
(cycle, number_of_threads)¶ Starts threads.
-
stopMonitors
(monitor_key)¶ Stop monitoring and save xml result.
-
stopThreads
()¶ Stops all running threads.
-
-
class
funkload.BenchRunner.
LoopTestRunner
(test_module, test_class, test_name, options, cycle, cvus, thread_id, thread_signaller, sleep_time, debug=False)¶ Run a unit test in loop.
-
run
()¶ Run a test in loop.
-
-
class
funkload.BenchRunner.
ThreadData
(thread, thread_id, thread_signaller)¶ Container for thread related data.
-
class
funkload.BenchRunner.
ThreadSignaller
¶ A simple class to signal whether a thread should continue running or stop.
-
funkload.BenchRunner.
add_cycle_result
(status)¶ Count number of result.
-
funkload.BenchRunner.
get_cycle_results
()¶ Return counters.
-
funkload.BenchRunner.
get_status
(success, failures, errors, color=False)¶ Return a status and an exit code.
-
funkload.BenchRunner.
load_unittest
(test_module, test_class, test_name, options)¶ instantiate a unittest.
-
funkload.BenchRunner.
main
()¶ Default main.
-
funkload.BenchRunner.
reset_cycle_results
()¶ Clear the previous results.