コード例 #1
0
ファイル: slave_script_4.py プロジェクト: tugend/Jalapeno
from shared_lib.tools import DEBUG
from shared_lib.tools import results_wrapper 
from a_random_numb import generate
from shared_lib.tools import parse_params
import sys
''' 
a wrapper that transparently handles timing, result and memory for given script execution and saves it
'''     

if __name__ == '__main__':
    
    # should be logged at main host
    params = parse_params(sys.argv)
    results_wrapper()(generate)(**params) 

コード例 #2
0
ファイル: runner.py プロジェクト: tugend/Jalapeno
"""
**Result wrapper**: saves the output from the decoratee to a results file  
**benchmark wrapper**: benchmarks the decoratee  
**bench slave context**: measures bandwidth and pings the different hosts  
-------------------------------------------------------------------------------
"""

from shared_lib.tools import results_wrapper, parse_params 
from shared_lib.collection import ubt 
import sys

if __name__ == '__main__':
	params = parse_params(sys.argv)
	results_wrapper()(ubt.benchmark_wrapper()(ubt.bench_slave_context))(**params)