-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed logging and added uuid comparison
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
- Loading branch information
1 parent
8e48be2
commit 555ff50
Showing
5 changed files
with
127 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
""" | ||
run test | ||
""" | ||
|
||
import logging | ||
from fmatch.matcher import Matcher | ||
from pkg.logrus import SingletonLogger | ||
from pkg.utils import ( | ||
run_hunter_analyze, | ||
load_config, | ||
get_es_url, | ||
process_test | ||
) | ||
from pkg.utils import run_hunter_analyze, load_config, get_es_url, process_test | ||
|
||
logger_instance= SingletonLogger().logger | ||
|
||
def run(config, output_path, hunter_analyze,output_format): | ||
def run(**kwargs): | ||
"""run method to start the tests | ||
Args: | ||
config (_type_): file path to config file | ||
debug (_type_): debug to be true or false | ||
output_path (_type_): output path to save the data | ||
hunter_analyze (_type_): changepoint detection through hunter. defaults to True | ||
output_format (_type_): output to be table or json | ||
Returns: | ||
_type_: _description_ | ||
""" | ||
data = load_config(config, logger_instance) | ||
ES_URL = get_es_url(data,logger=logger_instance) | ||
logger_instance = SingletonLogger(debug=logging.INFO).logger | ||
data = load_config(kwargs["config"]) | ||
ES_URL = get_es_url(data) | ||
result_output = {} | ||
for test in data["tests"]: | ||
match = Matcher(index="perf_scale_ci",level=logger_instance.level, ES_URL=ES_URL) | ||
result = process_test(test, match, logger_instance, output_path) | ||
if hunter_analyze: | ||
testname,result_data=run_hunter_analyze(result, test,output=output_format,matcher=match) | ||
result_output[testname]=result_data | ||
match = Matcher( | ||
index="perf_scale_ci", level=logger_instance.level, ES_URL=ES_URL | ||
) | ||
result = process_test( | ||
test, match, kwargs["output_path"], kwargs["uuid"], kwargs["baseline"] | ||
) | ||
if kwargs["hunter_analyze"]: | ||
testname, result_data = run_hunter_analyze( | ||
result, test, output=kwargs["output_format"], matcher=match | ||
) | ||
result_output[testname] = result_data | ||
return result_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters