Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Add histogram graph query handler using go echarts library #58

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

annismckenzie
Copy link

What was changed

This adds a new histogram_graph query that returns the HTML with an interactive chart showing the benchmark results.

This is the result if the HTML is saved to a file and opened in a browser (took a screenshot):

Screenshot 2023-01-24 at 7 55 54 PM

Why?

We read the blog post you published at https://mikhail.io/2021/03/maru-load-testing-tool-for-temporal-workflows/ but felt that manually importing the CSV into Google Sheets or something along these lines was too much manual work.

Checklist

  1. How was this tested:
    This is running in our CI pipeline. You basically start a scenario and it's started and monitored while it's running. After the scenario is done, we query the workflow and save the HTML file which can then be viewed directly in GitLab (no manual steps involved at all).

  2. Any docs updates needed?
    I added a section about the new query.

Copy link
Author

@annismckenzie annismckenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First self-review.

Comment on lines +54 to +59
// TODO:
// 1. Add raw data as a table (collapsed if possible)
// 2. Multiple charts / page?
// 3. Add the remaining data in a second chart: workflows started (v.Started),
// workflow executions (v.Execution), workflows closed (v.Closed)
// 4. Example used: https://github.com/go-echarts/examples/blob/master/examples/line.go
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed.

chart.SetGlobalOptions(
charts.WithTitleOpts(opts.Title{
Title: fmt.Sprintf("Benchmark: %s", request.Workflow.Name),
//Subtitle: fmt.Sprintf("Steps:\n%+v", request.Steps),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop

"testing"
)

// TODO: make this a runnable example?
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a test, it generates the same output as the query and saves that as a file in order to iterate on the graph settings.

@annismckenzie
Copy link
Author

@mikhailshilkov would you want to take a look? This works but isn't fully polished. I wanted to still open the PR to get feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant