Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jobs getchart command #530

Merged
merged 2 commits into from
May 4, 2023
Merged

Add jobs getchart command #530

merged 2 commits into from
May 4, 2023

Conversation

sm-shaw
Copy link
Contributor

@sm-shaw sm-shaw commented Apr 3, 2023

PR adds a getchart command to render job output as apache echarts/html. Intended usage is for the future modified read-only webservice to link to these charts to display job output graphically.
Also adds tickecharts package to the sourcebuild so will need to be tested by building from source to add this package to the lib directory.
echarts are interactive so can select the values to display.
Charts are generated on demand and stored in SQLite for future retrieval.

Options are for:
TPROC-C result | timing | tcount
TPROC-H result | timing

Also added helper/debug function savechart to save the generated html in the interim before webservice is updated meaning this command may be removed in future but presently is useful for testing the functionality.

example usage of getchart command:

hammerdb>job 642AFDD05F8703E233239313 getchart test
Error: Jobs Three Parameter Usage: jobs jobid getchart [ result | timing | tcount ]

hammerdb>job 642AFDD05F8703E233239313 getchart result
<!DOCTYPE html>
<html>
  <head>
...
    chart_a9d81afc436f437ba0979aa3d53817d6.setOption(option_a9d81afc436f437ba0979aa3d53817d6);
    </script>
  </body>
</html>


set mychart [ job 642AFDD05F8703E233239313 getchart timing ]
hammerdb>puts $mychart
<!DOCTYPE html>
<html>
...

hammerdb>savechart [ job 642AFDD05F8703E233239313 getchart tcount ] tprocctcount.html
Saved chart html to tprocctcount.html

Tested both on Linux and Windows. Example charts produced on laptops for functionality as opposed to performance.

tproccresult
tprocctcount
tprocctiming
tprochresult
tprochtiming

Windows example:
winexample

@sm-shaw sm-shaw merged commit 6a8d32d into TPC-Council:master May 4, 2023
@sm-shaw sm-shaw deleted the 352 branch May 4, 2023 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants