action #57419
closed
Display time spent on particular module
Added by pvorel over 5 years ago.
Updated over 4 years ago.
Category:
Feature requests
Description
Motivation¶
openQA displays a time spent on whole tests. It would be useful to have the information about the time spent on each test module.
Acceptance criteria¶
- AC1: Elapsed time per test module is visible in the job details webUI page
- AC2: Same as AC1 for API
Suggestions¶
We already have the information available in the scope of os-autoinst, e.g. as visible from autoinst-log.txt . We should make the information available to openQA in a structured manner and render it accordingly over API and webUI.
- Put elapsed time into module test result, e.g. existing json file in os-autoinst scope
- When parsing module results also read out the elapsed time
- Provide the elapsed time when job details are requested over API
- Provide the elapsed time in the job details webUI page
- Target version set to Ready
We need to properly track this from isotovideo into the DB into the UI, please no hacks
- Description updated (diff)
- Status changed from New to Workable
- Status changed from Workable to In Progress
- Assignee set to Xiaojing_liu
- Target version changed from Ready to Current Sprint
The first solution was saving the spent times in a separate file. This was not good so close the PR.
As Oliver and Mkittler suggestions, should save the spent times in details file, and change the structure of details file to HASH.
- Status changed from In Progress to Feedback
- Status changed from Feedback to Resolved
We have merged the os-autoinst change and it is effective on os-autoinst as well now. Newer jobs, e.g. https://openqa.opensuse.org/tests/1182767 show the correct display of execution time per module as well as does the api, e.g. openqa-client --host https://openqa.opensuse.org jobs/1182767/details
returns execution_time => "21s"
and such.
- Status changed from Resolved to Workable
- Status changed from Workable to In Progress
- Status changed from In Progress to Feedback
- Status changed from Feedback to Resolved
AC2 fulfilled, e.g. curl -s https://openqa.suse.de/api/v1/jobs/4116090/details | jq '.job | .testresults | .[] | .name,.execution_time' | less
shows:
"boot_ltp"
"22s"
"f00f"
null
"crash01"
null
"crash02"
null
"mem01"
"1s"
"fork12"
"8s"
"shutdown_ltp"
"27s"
Thanks for implementing this, I really appreciate it.
BTW some tests spent just 0s (https://openqa.suse.de/tests/4125076#step/cve-2015-0235/8), thus "execution_time" : 0 in ./testresults/result-FOO.json, but because change_sec_to_word() returns empty string instead of 0. IMHO it'd be better to write 0s instead of nothing, but not sure if we want to bother that. it's probably again some LTP specific issue.
If we do care I can fix it.
pvorel wrote:
BTW some tests spent just 0s (https://openqa.suse.de/tests/4125076#step/cve-2015-0235/8), thus "execution_time" : 0 in ./testresults/result-FOO.json, but because change_sec_to_word() returns empty string instead of 0. IMHO it'd be better to write 0s instead of nothing, but not sure if we want to bother that. it's probably again some LTP specific issue.
If we do care I can fix it.
Hmm, actually it does not show the 0s is my expectation :)
OK, no problem for me :). It was a bit confusing, because I didn't expect that something was that quick that would take less than 1s, so it looked like error.
Also available in: Atom
PDF