-
Notifications
You must be signed in to change notification settings - Fork 233
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 benchmark script to compare two different builds of s5cmd #471
Conversation
Assumes that user has two copies of s5cmd one is default commandline app, second one is in the current directory. A bucket name MUST be provided with -b flag. User can optionally: - add a key prefix with -k flag. - specify hyperfine warmup counts with -w flag - specify hyperfine runs counts with -r flag. Example calls `./benchmark.sh -b mcanktmpbuck` `./benchmark.sh -w 1 -r 4 -b mcanktmpbuck -k example_key_prefix `
… the tests. user can specify either version(tag), commit hash, or the PR number of the s5cmd that are to be used in the tests. Two versions of the s5cmd will be used namely old and new. They can be specified by -o and -n flags, respectively. Though version specified by o does not have to be older than that of specified by -n flag. Default values of versions are v1.4.0 for old (-o), and v2.0.0 for new (-n). Example execution that compares performance of #456 with the v1.4.0: ` ./benchmark.sh -b mys5cmbuck -n 456 -o v1.4.0 -k 1829` Also note that user must provide a proper bucket which she has write/read/delete access. Co-Authored-By: boraberke <67373739+boraberke@users.noreply.github.com>
- Measure the download and delete speeds - quote shell variables, see also "shellcheck(SC2086)"
…into benchmark-script
Results will be both printed out to console and saved to Benchmark summary:
Detailed summary:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add --help
command to your benchmark script. Otherwise users need to read this documentation before using this script
Just updated from shell script to python script. Users now can use |
Before this commit, for each individual command, a scenario was required. These scenarios were dependent to each other. However, with this commit, any scenario will run `upload`, `download`, `remove` commands for a specified file size and file count.
Add a wait of 10 seconds after preparation to overcome errors due to eventual consistency of s3
This python script allow us to compare two different build (from either version tag, PR number or commit tag) performance under various scenarios. These scenarios include:
To run use the following syntax:
Examples
Above command will compare v2.0.0 to PR:456 with 2 warmup runs and 10 benchmark runs.
When using
-hf
and-sf
flags, use quotes like above and start with an empty space. If not started with an empty space, it might give an error. This is a known issue withargparse
and this discussion can be useful to understand the problem deeper.