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

tests(gatsby): Add metrics output for filter and sort benchmarks #34724

Closed
wants to merge 2 commits into from

Conversation

imjoshin
Copy link
Contributor

@imjoshin imjoshin commented Feb 4, 2022

Description

We currently have a benchmarks/query-filters-sort tool for running sites under different node size/count and filter/sort conditions. This PR extends this tool to enable CSV logging so we can better visualize the impact of certain changes.

Example usage:

$ BUILD_COUNT=10 OUTPUT=thousand NUM_NODES=1000 FILTER=gt yarn bench
yarn run v1.21.0
$ ./benchmark.sh

Starting 5 builds...
Writing results to ./output/thousand/

12:39:13 - Build #1: initializing
12:39:14 - Build #1: running with pid 3540
12:39:34 - Build #1: finished in 20090ms
12:39:34 - Build #2: initializing
12:39:37 - Build #2: running with pid 8390
12:39:56 - Build #2: finished in 19392ms
12:39:56 - Build #3: initializing
12:39:59 - Build #3: running with pid 13252
12:40:19 - Build #3: finished in 20118ms
12:40:19 - Build #4: initializing
12:40:22 - Build #4: running with pid 18010
12:40:42 - Build #4: finished in 20153ms
12:40:42 - Build #5: initializing
12:40:45 - Build #5: running with pid 22871
12:41:06 - Build #5: finished in 20771ms

Finished!
Done in 112.87s.

The thousand_summary.csv file:

build,time,max_rss,max_vsz,result,code
1,20090,530,33310,SUCCESS,0
2,19392,532,33315,SUCCESS,0
3,20118,533,33311,SUCCESS,0
4,20153,528,33310,SUCCESS,0
5,20771,524,33310,SUCCESS,0

And each thousand_build_X.csv file:

time,rss,vsz
111,48,574
221,63,588
330,70,599
440,89,754
549,89,752
661,91,756
773,112,760
886,128,773
997,135,781
1108,147,791
1221,163,808
1332,176,851
...

Documentation

Documented changes/usage in the README

Related Issues

[sc-45733]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 4, 2022
@imjoshin
Copy link
Contributor Author

Closing this in favor of #34810

@imjoshin imjoshin closed this Feb 15, 2022
@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 22, 2022
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.

2 participants