forgot this in my last commit
work related to [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=3958]
This commit is contained in:
		
							parent
							
								
									7976d67860
								
							
						
					
					
						commit
						b8bb991abd
					
				|  | @ -4,6 +4,8 @@ from .version import __version__ as iprbench_version | |||
| import socket | ||||
| import subprocess | ||||
| import re | ||||
| import os | ||||
| import pwd | ||||
| 
 | ||||
| 
 | ||||
| class MeasurementTime(IAutoParam): | ||||
|  | @ -50,6 +52,16 @@ class HostFqdn(IAutoParam): | |||
|         return socket.getfqdn() | ||||
| 
 | ||||
| 
 | ||||
| class User(IAutoParam): | ||||
| 
 | ||||
|     def __init__(self): | ||||
|         bench_param = BenchParam('user', BenchParam.Type.PARAM_TYPE_STRING, 'the user that triggered the benchmark (eg "root")') | ||||
|         super().__init__(bench_param) | ||||
| 
 | ||||
|     def get_value(self) -> BenchParamType: | ||||
|         return pwd.getpwuid(os.getuid())[0] | ||||
| 
 | ||||
| 
 | ||||
| class NumCpus(IAutoParam): | ||||
| 
 | ||||
|     def __init__(self): | ||||
|  |  | |||
|  | @ -43,7 +43,8 @@ class BenchmarksTestCase(unittest.TestCase): | |||
|             'blas_library': '<default-libblas>:<default>', | ||||
|             'matrix_size': 1024, | ||||
|             'num_loops': 10, | ||||
|             'num_cores': 2 | ||||
|             'num_cores': 2, | ||||
|             'launcher': 'iprbench.unittest', | ||||
|         } | ||||
|         test_benchmark(benchmark_id, benchmark_config, self.results_root_dir) | ||||
| 
 | ||||
|  |  | |||
|  | @ -40,6 +40,7 @@ class ClusterBenchTestCase(unittest.TestCase): | |||
|             'blas_library': '<default-libblas>:<default>', | ||||
|             'matrix_size': 1024, | ||||
|             'num_loops': 10, | ||||
|             'launcher': 'iprbench.unittest', | ||||
|         } | ||||
|         test_clusterbench_submit_with_benchmark(benchmark_id, benchmark_config, self.results_root_dir) | ||||
| 
 | ||||
|  |  | |||
|  | @ -24,7 +24,8 @@ def test_resultsdb(resultsdb_params: ResultsDbParams, results_root_path: Path): | |||
|         'blas_library': '<default-libblas>:<default>', | ||||
|         'matrix_size': 1024, | ||||
|         'num_loops': 10, | ||||
|         'num_cores': 2 | ||||
|         'num_cores': 2, | ||||
|         'launcher': 'iprbench.unittest', | ||||
|     } | ||||
|     command = f'iprbench-run --benchmark-id \'{benchmark_id}\' --config \'{json.dumps(benchmark_config)}\' --results-dir {results_dir} --resultsdb-params \'{json.dumps(resultsdb_params)}\'' | ||||
|     subprocess.run(command, shell=True, check=True, executable='/bin/bash') | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue