v0.0.16
- added the output_url autoparameter. It allows to automatically register the location of the benchmark output files in case they're needed and preserved. This will help traceability work related to [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=3958]
This commit is contained in:
parent
b85f381241
commit
ccb964bb44
|
@ -1,11 +1,12 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from .core import IAutoParam, BenchParam, BenchParamType
|
|
||||||
from .version import __version__ as iprbench_version
|
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import pwd
|
import pwd
|
||||||
|
from pathlib import Path
|
||||||
|
from .core import IAutoParam, BenchParam, BenchParamType
|
||||||
|
from .version import __version__ as iprbench_version
|
||||||
|
|
||||||
|
|
||||||
class MeasurementTime(IAutoParam):
|
class MeasurementTime(IAutoParam):
|
||||||
|
@ -131,3 +132,14 @@ class CpuModel(IAutoParam):
|
||||||
cpu_model = match['cpu_model']
|
cpu_model = match['cpu_model']
|
||||||
# print(cpu_model)
|
# print(cpu_model)
|
||||||
return CpuModel.model_name_to_cpu_model_id(cpu_model)
|
return CpuModel.model_name_to_cpu_model_id(cpu_model)
|
||||||
|
|
||||||
|
|
||||||
|
class OutputUrl(IAutoParam):
|
||||||
|
|
||||||
|
def __init__(self, output_dir: Path):
|
||||||
|
bench_param = BenchParam('output_url', BenchParam.Type.PARAM_TYPE_STRING, 'the location of the output files of this benchmarks')
|
||||||
|
super().__init__(bench_param)
|
||||||
|
self.output_url = f'file://{socket.getfqdn()}{output_dir.absolute()}'
|
||||||
|
|
||||||
|
def get_value(self) -> BenchParamType:
|
||||||
|
return self.output_url
|
||||||
|
|
|
@ -10,7 +10,7 @@ from .benchmarks.mamul1 import MaMul1
|
||||||
from .resultsdb.tsvresultsdb import TsvResultsDbCreator
|
from .resultsdb.tsvresultsdb import TsvResultsDbCreator
|
||||||
from .resultsdb.sqlresultsdb import SqliteResultsDbCreator, SqlServerResultsDbCreator
|
from .resultsdb.sqlresultsdb import SqliteResultsDbCreator, SqlServerResultsDbCreator
|
||||||
from .util import Singleton
|
from .util import Singleton
|
||||||
from .autoparams import MeasurementTime, HostFqdn, User, NumCpus, CpuModel, IprBenchVersion, HostId
|
from .autoparams import MeasurementTime, HostFqdn, User, NumCpus, CpuModel, IprBenchVersion, HostId, OutputUrl
|
||||||
|
|
||||||
|
|
||||||
class BenchmarkFactory(metaclass=Singleton):
|
class BenchmarkFactory(metaclass=Singleton):
|
||||||
|
@ -62,6 +62,7 @@ def main():
|
||||||
results_db.add_auto_param(User())
|
results_db.add_auto_param(User())
|
||||||
results_db.add_auto_param(NumCpus())
|
results_db.add_auto_param(NumCpus())
|
||||||
results_db.add_auto_param(CpuModel())
|
results_db.add_auto_param(CpuModel())
|
||||||
|
results_db.add_auto_param(OutputUrl(args.results_dir))
|
||||||
results_db.add_common_param(BenchParam('launcher', BenchParam.Type.PARAM_TYPE_STRING, description='what triggered the benchmark (eg "alambix.job.12345", or "manual")'))
|
results_db.add_common_param(BenchParam('launcher', BenchParam.Type.PARAM_TYPE_STRING, description='what triggered the benchmark (eg "alambix.job.12345", or "manual")'))
|
||||||
|
|
||||||
target_host = {
|
target_host = {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = '0.0.15'
|
__version__ = '0.0.16'
|
||||||
|
|
Loading…
Reference in New Issue