Skip to content

Instantly share code, notes, and snippets.

@Karmak23
Last active August 29, 2015 14:07
Show Gist options
  • Save Karmak23/2fce8ce689cd2fc61ade to your computer and use it in GitHub Desktop.
Save Karmak23/2fce8ce689cd2fc61ade to your computer and use it in GitHub Desktop.
Tests on the popshake API

Long is ≥ 0.5 sec

With 100 concurrent connections

python scripts/test_API.py 200 100
INFO: Starting timings by ranges of 200 calls on http://popshake.codegastudio.com/api, @2014-09-29T14:07:57.354054)
INFO: Results: 140/200 (70.0%) long calls for /; average others: 0.199sec
INFO: Results: 64/200 (32.0%) long calls for /moods/; average others: 0.223sec
INFO: Results: 84/200 (42.0%) long calls for /moods/1/; average others: 0.273sec
INFO: Results: 80/200 (40.0%) long calls for /moods/2/; average others: 0.262sec
INFO: Results: 105/200 (52.5%) long calls for /moods/3/; average others: 0.274sec
INFO: Results: 85/200 (42.5%) long calls for /moods/4/; average others: 0.310sec
INFO: Total long calls: 558 (46.5%).
INFO: average long: 3.953sec on 558 calls.
INFO: average good: 0.260sec on 642 calls.
INFO: average all: 1.977sec on 1200 calls.
INFO: Cumulated requests runtime 2373.000 seconds, for 29.020 seconds of total run.

With 2000 connections on each endpoint

python scripts/test_API.py 2000 100
INFO: Starting timings by ranges of 2000 calls on http://popshake.codegastudio.com/api, @2014-09-29T14:09:08.179597)
INFO: Results: 830/2000 (41.5%) long calls for /; average others: 0.282sec
INFO: Results: 944/2000 (47.2%) long calls for /moods/; average others: 0.326sec
INFO: Results: 978/2000 (48.9%) long calls for /moods/1/; average others: 0.293sec
INFO: Results: 1191/2000 (59.5%) long calls for /moods/2/; average others: 0.353sec
INFO: Results: 914/2000 (45.7%) long calls for /moods/3/; average others: 0.320sec
INFO: Results: 955/2000 (47.8%) long calls for /moods/4/; average others: 0.315sec
INFO: Total long calls: 5812 (48.4%).
INFO: average long: 3.349sec on 5812 calls.
INFO: average good: 0.313sec on 6188 calls.
INFO: average all: 1.783sec on 12000 calls.
INFO: Cumulated requests runtime 21398.837 seconds, for 216.977 seconds of total run.

With 50 concurrent connections

python scripts/test_API.py 500
INFO: Starting timings by ranges of 500 calls on http://popshake.codegastudio.com/api, @2014-09-29T14:02:30.101862)
INFO: Results: 167/500 (33.4%) long calls for /; average others: 0.250sec
INFO: Results: 143/500 (28.6%) long calls for /moods/; average others: 0.260sec
INFO: Results: 144/500 (28.8%) long calls for /moods/1/; average others: 0.305sec
INFO: Results: 149/500 (29.8%) long calls for /moods/2/; average others: 0.334sec
INFO: Results: 308/500 (61.6%) long calls for /moods/3/; average others: 0.338sec
INFO: Results: 263/500 (52.6%) long calls for /moods/4/; average others: 0.294sec
INFO: Total long calls: 1174 (39.1%).
INFO: average long: 2.714sec on 1174 calls.
INFO: average good: 0.293sec on 1826 calls.
INFO: average all: 1.241sec on 3000 calls.
INFO: Cumulated requests runtime 3722.623 seconds, for 79.433 seconds of total run.

With 25 concurrent connections

python scripts/test_API.py 200 25
INFO: Starting timings by ranges of 200 calls on http://popshake.codegastudio.com/api, @2014-09-29T14:18:00.788588)
INFO: Results: 23/200 (11.5%) long calls for /; average others: 0.239sec
INFO: Results: 5/200 (2.5%) long calls for /moods/; average others: 0.215sec
INFO: Results: 26/200 (13.0%) long calls for /moods/1/; average others: 0.275sec
INFO: Results: 9/200 (4.5%) long calls for /moods/2/; average others: 0.293sec
INFO: Results: 8/200 (4.0%) long calls for /moods/3/; average others: 0.273sec
INFO: Results: 6/200 (3.0%) long calls for /moods/4/; average others: 0.259sec
INFO: Total long calls: 77 (6.4%).
INFO: average long: 2.548sec on 77 calls.
INFO: average good: 0.259sec on 1123 calls.
INFO: average all: 0.406sec on 1200 calls.
INFO: Cumulated requests runtime 486.638 seconds, for 22.278 seconds of total run.

With 10 concurrent connections

python scripts/test_API.py 200 10
INFO: Starting timings by ranges of 200 calls on http://popshake.codegastudio.com/api, @2014-09-29T14:05:21.434304)
INFO: Results: 14/200 (7.0%) long calls for /; average others: 0.182sec
INFO: Results: 11/200 (5.5%) long calls for /moods/; average others: 0.189sec
INFO: Results: 7/200 (3.5%) long calls for /moods/1/; average others: 0.200sec
INFO: Results: 17/200 (8.5%) long calls for /moods/2/; average others: 0.197sec
INFO: Results: 13/200 (6.5%) long calls for /moods/3/; average others: 0.202sec
INFO: Results: 15/200 (7.5%) long calls for /moods/4/; average others: 0.184sec
INFO: Total long calls: 77 (6.4%).
INFO: average long: 1.552sec on 77 calls.
INFO: average good: 0.192sec on 1123 calls.
INFO: average all: 0.279sec on 1200 calls.
INFO: Cumulated requests runtime 335.393 seconds, for 35.654 seconds of total run.

Long is ≥ 1 sec

With serial connections only (no concurrency)

Mmm… 1.5%…

python scripts/test_API.py 500
INFO:Starting timings by ranges of 500 calls on http://popshake.codegastudio.com/api, @2014-09-29T12:26:19.743714)
INFO:Results: 7/500 (1.4%) long calls for /: [109, 136, 180, 224, 304, 338, 373]; average others: 0.180sec
INFO:Results: 6/500 (1.2%) long calls for /moods/: [20, 22, 304, 363, 364, 484]; average others: 0.190sec
INFO:Results: 8/500 (1.6%) long calls for /moods/1/: [70, 116, 261, 267, 280, 327, 349, 476]; average others: 0.239sec
INFO:Results: 8/500 (1.6%) long calls for /moods/2/: [101, 167, 216, 240, 254, 255, 356, 410]; average others: 0.259sec
INFO:Results: 5/500 (1.0%) long calls for /moods/3/: [120, 221, 245, 307, 316]; average others: 0.249sec
INFO:Results: 9/500 (1.8%) long calls for /moods/4/: [31, 94, 170, 184, 194, 275, 349, 352, 365]; average others: 0.236sec
INFO:Total long calls: 43/3000 (1.4%); average others: 0.226sec on 2957 calls.
INFO:Total web requests runtime: 892.934 seconds.
python scripts/test_API.py 150
INFO:Starting timings by ranges of 150 calls on http://popshake.codegastudio.com/api, @2014-09-29T12:19:36.266256)
INFO:Results: 1/150 (0.7%) long calls for /: [20]; average others: 0.178sec
INFO:Results: 3/150 (2.0%) long calls for /moods/: [48, 105, 140]; average others: 0.186sec
INFO:Results: 2/150 (1.3%) long calls for /moods/1/: [77, 113]; average others: 0.181sec
INFO:Results: 2/150 (1.3%) long calls for /moods/2/: [12, 142]; average others: 0.206sec
INFO:Results: 4/150 (2.7%) long calls for /moods/3/: [32, 86, 104, 123]; average others: 0.194sec
INFO:Results: 2/150 (1.3%) long calls for /moods/4/: [26, 64]; average others: 0.193sec
INFO:Total long calls: 14/900 (1.6%); average others: 0.189sec on 886 calls.
INFO:Total web requests runtime: 241.000 seconds.
python scripts/test_API.py 
INFO:Starting timings by ranges of 50 calls on http://popshake.codegastudio.com/api, @2014-09-29T12:00:08.939351)
INFO:Results: 0/50 (0.0%) long calls for /: []; average others: 0.181sec
INFO:Results: 2/50 (4.0%) long calls for /moods: [0, 25]; average others: 0.237sec
INFO:Results: 3/50 (6.0%) long calls for /moods/: [9, 31, 43]; average others: 0.185sec
INFO:Results: 1/50 (2.0%) long calls for /moods/1: [33]; average others: 0.256sec
INFO:Results: 2/50 (4.0%) long calls for /moods/1/: [9, 33]; average others: 0.186sec
INFO:Results: 1/50 (2.0%) long calls for /moods/2: [25]; average others: 0.254sec
INFO:Results: 1/50 (2.0%) long calls for /moods/2/: [39]; average others: 0.211sec
INFO:Results: 2/50 (4.0%) long calls for /moods/3/: [11, 34]; average others: 0.195sec
INFO:Results: 3/50 (6.0%) long calls for /moods/4/: [6, 9, 16]; average others: 0.187sec
INFO:Results: 0/50 (0.0%) long calls for /moods/5/: []; average others: 0.199sec
INFO:Results: 0/50 (0.0%) long calls for /moods/6/: []; average others: 0.202sec
INFO:Total long calls: 15/550 (2.7%); average others: 0.209sec on 535 calls.
python scripts/test_API.py 
INFO:Results: 0/50 (0.0%) long calls for /: []; average others: 0.171sec
INFO:Results: 0/50 (0.0%) long calls for /moods/: []; average others: 0.178sec
INFO:Results: 1/50 (2.0%) long calls for /moods/1/: [16]; average others: 0.215sec
INFO:Results: 1/50 (2.0%) long calls for /moods/2/: [36]; average others: 0.249sec
INFO:Results: 2/50 (4.0%) long calls for /moods/3/: [9, 16]; average others: 0.235sec
INFO:Results: 1/50 (2.0%) long calls for /moods/4/: [21]; average others: 0.228sec
INFO:Results: 0/50 (0.0%) long calls for /moods/5/: []; average others: 0.241sec
INFO:Results: 1/50 (2.0%) long calls for /moods/6/: [32]; average others: 0.242sec
INFO:Total long calls: 6/400 (1.5%); average others: 0.220sec on 394 calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment