fullstorydev / solr-bench

Solr benchmarking and load testing harness
Apache License 2.0
17 stars 10 forks source link

Handle graph rendering logic in js. Added paging and comparisons between branches #38

Closed patsonluk closed 1 year ago

patsonluk commented 1 year ago

Description

Added a new flow that only handles results gathering/pre-processing in python script and delegate graph rendering logic to js. The main advantage of this is the flexibility to manipulate the result data and since js has better access/control over html elements it's also easier to handle html generation via js.

The suggested flow is pretty similar to before. Run the python script and then open the result html file. As described in https://github.com/fullstorydev/solr-bench/compare/patsonluk/graph-js?expand=1#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5

The new script organizes the graphs slightly differently:

  1. Allow comparing different branches. Result graphs of each branch are organized into pages, controlled by the new side bar to the left. There's also one final page which compare task performance across different branches.
  2. Graphs are broken down to per test task. Since the duration/nature of each task (query/index/restart) could vary quite drastically, it could become difficult to read the graph with all the tasks data within a single graph
  3. For now the graph is either a "simple" graph (the duration of the test), and a "percentile" graph (with median, and percentiles of each test operation). For percentile graphs, we do not show the total time now, as for the only task type (querying) for "percentile", the duration of test does not mean much (since it's rate limited), while the percentiles are the ones that matter (duration of each test query execution)

All the graph related resources are placed in the new graph directory. It contains 3 files:

  1. graph.html - basic html with some styles. A static file
  2. graph.js - the javascript for graphing. A static file
  3. graph-data.js - generated by the python script

This is an experiment to see what's involved if we want to move graph rendering to javascript. That might be a good direction if we want better flexibility with future development (for example adding metrics or different types of charts).

image

patsonluk commented 1 year ago

@chatman please take a look at this PR, quite critical for our solr performance framework work. Many thanks! 🙇🏼

Added a sample graph-data.js file (please rename to graph-data.js) and drop it to solr-bench\graph directory and open solr-bench\graph\graph.html to see the work graph-data.js.txt

chatman commented 1 year ago

@patsonluk This is very exciting and well organized. I'll work on this new graph framework now, and add the metrics to the graphs. Please feel free to merge :-) Thanks!

chatman commented 1 year ago

I'm merging it, so that I can use this on the https://mostly.cool server for the data already collected there. :-)

patsonluk commented 1 year ago

I'm merging it, so that I can use this on the https://mostly.cool server for the data already collected there. :-)

Thank you @chatman ! I have committed some minor fixes in master https://github.com/fullstorydev/solr-bench/commit/c91388d011c9e974c8ae31c8c49c02e21a43e0fa .

Please do lemme know whether it works for https://mostly.cool/