Skip to content

Conversation

@shazow
Copy link
Contributor

@shazow shazow commented Nov 20, 2019

It's not done yet but it does things! I'd like to merge this into master and keep iterating on it.

Usage:
  versus [OPTIONS] [endpoint...]

Application Options:
      --timeout=     Abort request after duration (default: 30s)
      --stop-after=  Stop after N requests per endpoint, N can be a number or duration.
      --concurrency= Concurrent requests per endpoint (default: 1)
  -v, --verbose      Show verbose logging.
      --version      Print version and exit.

Help Options:
  -h, --help         Show this help message

Arguments:
  endpoint:          API endpoint to load test, such as "http://localhost:8080/"

Output looks like this right now:

$ yes | ./versus -vv --stop-after=10 --concurrency=2 http://localhost:2019/ http://localhost:2019/foo
4:48PM INF started endpoint clients, waiting for stdin clients=2
4:48PM DBG starting client concurrency=2 endpoint=http://localhost:2019/
4:48PM DBG starting client concurrency=2 endpoint=http://localhost:2019/foo
4:48PM DBG result error="bad status code: 404" id=1 mismatched=0 ms=[4.840164,4.984131]
4:48PM DBG result error="bad status code: 404" id=2 mismatched=0 ms=[4.785901,4.668216]
4:48PM DBG result error="bad status code: 404" id=4 mismatched=0 ms=[5.331177,5.354405]
4:48PM INF stopping request feed after 10 requests
4:48PM DBG result error="bad status code: 404" id=3 mismatched=0 ms=[5.843097,5.510519]
4:48PM DBG result error="bad status code: 404" id=6 mismatched=0 ms=[4.773996,4.938075]
4:48PM DBG result error="bad status code: 404" id=5 mismatched=0 ms=[6.296902,5.344927]
4:48PM DBG result error="bad status code: 404" id=7 mismatched=0 ms=[4.893991,4.688761]
4:48PM DBG result error="bad status code: 404" id=8 mismatched=0 ms=[4.061258,4.754822]
4:48PM DBG received final request, shutting down endpoint=http://localhost:2019/
4:48PM DBG received final request, shutting down endpoint=http://localhost:2019/foo
4:48PM DBG received final request, shutting down endpoint=http://localhost:2019/
4:48PM DBG received final request, shutting down endpoint=http://localhost:2019/foo
4:48PM DBG result error="bad status code: 404" id=10 mismatched=0 ms=[2.619062,2.549448]
4:48PM DBG result error="bad status code: 404" id=9 mismatched=0 ms=[3.456386,2.628039]
Endpoints:

0. "http://localhost:2019/"
   Requests/Sec: 218.03
   Average:      4.586468ms
   Errors:       100.00%
   * [10] "bad status code: 404"

1. "http://localhost:2019/foo"
   Requests/Sec: 215.25
   Average:      4.645859ms
   Errors:       100.00%
   * [10] "bad status code: 404"

** Summary for 2 endpoints:
   Completed:  10 results with 20 total requests
   Elapsed:    4.616163ms request avg, 25.040007ms total run time
   Errors:     20 (100.00%)
   Mismatched: 0

@shazow shazow self-assigned this Dec 3, 2019
@shazow shazow changed the title [WIP] Proof of concept for versus Versus v1-ish Dec 18, 2019
@shazow shazow marked this pull request as ready for review December 18, 2019 21:25
@shazow shazow merged commit d9fde8d into master Dec 19, 2019
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