Skip to content

Commit

Permalink
Rename "kind" series to time series
Browse files Browse the repository at this point in the history
Time series is a common term, it's just that we support multiple
namespace of time
  • Loading branch information
tbarbette committed Jul 14, 2024
1 parent 0fe177a commit e3c8c39
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 103 deletions.
24 changes: 12 additions & 12 deletions npf/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def compare(self,
for late_variables in test.get_late_variables():
variables.update(late_variables.execute(variables, test))

new_results_types, new_kind_results_types, output, err, n_exec, n_err = test.execute(build, run, variables,
new_results_types, new_time_results_types, output, err, n_exec, n_err = test.execute(build, run, variables,
n_runs=test.config["n_supplementary_runs"],
allowed_types={SectionScript.TYPE_SCRIPT, SectionScript.TYPE_EXIT})

Expand Down Expand Up @@ -160,7 +160,7 @@ def regress_all_tests(self,
"""
repo = self.repo
data_datasets = []
kind_datasets = []
time_datasets = []

if repo.url:
build = repo.get_last_build(history=history)
Expand All @@ -179,30 +179,30 @@ def regress_all_tests(self,
if repo.last_build:
try:
old_all_results = repo.last_build.load_results(test)
old_kind_all_results = repo.last_build.load_results(test, kind=True)
old_time_all_results = repo.last_build.load_results(test, kind=True)
except FileNotFoundError:
old_all_results = None
old_kind_all_results = None
old_time_all_results = None
else:
old_all_results = None
old_kind_all_results = None
old_time_all_results = None
try:
if on_finish:
def early_results(all_data_results, all_kind_results):
on_finish(build,(data_datasets + [all_data_results]),(kind_datasets + [all_kind_results]))
def early_results(all_data_results, all_time_results):
on_finish(build,(data_datasets + [all_data_results]),(time_datasets + [all_time_results]))
else:
early_results = None
all_results,kind_results, init_done = test.execute_all(
all_results,time_results, init_done = test.execute_all(
build,
prev_results=build.load_results(test),
prev_kind_results=build.load_results(test, kind=True),
prev_time_results=build.load_results(test, kind=True),
options=options,
do_test=options.do_test,
on_finish=early_results,
iserie=iserie*len(tests) + itest,
nseries=len(tests)*nseries)

if all_results is None and kind_results is None:
if all_results is None and time_results is None:
return None, None, None
except ScriptInitException:
return None, None, None
Expand All @@ -214,7 +214,7 @@ def early_results(all_data_results, all_kind_results):
if variables_passed == variables_total:
nok += 1
data_datasets.append(all_results)
kind_datasets.append(kind_results)
time_datasets.append(time_results)
test.n_variables_passed = variables_passed
test.n_variables = variables_total

Expand All @@ -224,4 +224,4 @@ def early_results(all_data_results, all_kind_results):
build.n_passed = nok
build.n_tests = len(tests)

return build, data_datasets, kind_datasets
return build, data_datasets, time_datasets
2 changes: 1 addition & 1 deletion npf/section.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def __init__(self):
self.__add("result_append", False)
self.__add("result_overwrite", False)
self.__add_list("result_regex", [
r"(:?(:?(?P<kind>[A-Z0-9_]+)-)?(?P<kind_value>[0-9.]+)-)?RESULT(:?-(?P<type>[A-Z0-9_:~.@()-]+))?[ \t]+(?P<value>[0-9.]+(e[+-][0-9]+)?)[ ]*(?P<multiplier>[nµugmkKGT]?)(?P<unit>s|sec|b|byte|bits)?"])
r"(:?(:?(?P<kind>[A-Z0-9_]+)-)?(?P<time_value>[0-9.]+)-)?RESULT(:?-(?P<type>[A-Z0-9_:~.@()-]+))?[ \t]+(?P<value>[0-9.]+(e[+-][0-9]+)?)[ ]*(?P<multiplier>[nµugmkKGT]?)(?P<unit>s|sec|b|byte|bits)?"])
self.__add_list("results_expect", [])
self.__add("autokill", True)
self.__add("critical", False)
Expand Down
Loading

0 comments on commit e3c8c39

Please sign in to comment.