ISISComputingGroup / IBEX

Top level repository for IBEX stories
5 stars 2 forks source link

genie_python: Add function to get runtime #6519

Closed DominicOram closed 3 years ago

DominicOram commented 3 years ago

As an instrument scientist on Larmor (RD) I would like to be able to get the current runtime of the run through genie_python. This function should return an integer of how many seconds I have been running.

Acceptance Criteria

FreddieAkeroyd commented 3 years ago

Should we look to returning a float for better accuracy? We'd need to adjust the underlying PV and a few other bits

FreddieAkeroyd commented 3 years ago

There is already a get_run_duration function the the genie python dae api , it also has optional period support

FreddieAkeroyd commented 3 years ago

It seems RD requires something slightly different, he would like a duration since run start that does not take into account pause/waiting etc. get_run_duration above does allow for this, and is what is displayed on the dashboard as "run time". What RD requires is (time now - time run started) - we may need to give this a different name to "runtime" to avoid confusion.

daryakoskeroglu commented 3 years ago

https://github.com/ISISComputingGroup/system_tests/pull/82

daryakoskeroglu commented 3 years ago

https://github.com/ISISComputingGroup/genie_python/pull/348

daryakoskeroglu commented 3 years ago

https://github.com/ISISComputingGroup/IBEX/commit/94dac47c4fdd06b426795045c649b40d6c1ce708

DominicOram commented 3 years ago

Works great, minor comments on the PRs, sorry. Also, can you drop an email to the instrument scientist to let them know it will be there next cycle?