openvsx
openvsx copied to clipboard
Cache `/api/-/search` results
Testing steps
- Check out master
- Download a bunch of extensions in a directory (the more the better)
- Configure
extensionDirinsrc/gatling/resources/application.properties - Add
super_tokentoaccess-tokens.csv - Start the server:
./gradlew runServer - Run
src/gatling/scripts/fill-database.sh - Wait for the server to process all publish background jobs
- Run
./gradlew --rerun-tasks gatlingRun-org.eclipse.openvsx.RegistryAPISearchSimulation - Checkout this PR
- Again run
./gradlew --rerun-tasks gatlingRun-org.eclipse.openvsx.RegistryAPISearchSimulation
Performance Comparison
== MASTER f956110 3 RUNS =============================================================== ---- Global Information -------------------------------------------------------- > request count 5000 (OK=5000 KO=0 ) > min response time 4 (OK=4 KO=- ) > max response time 2193 (OK=2193 KO=- ) > mean response time 57 (OK=57 KO=- ) > std deviation 106 (OK=106 KO=- ) > response time 50th percentile 20 (OK=20 KO=- ) > response time 75th percentile 39 (OK=39 KO=- ) > response time 95th percentile 342 (OK=342 KO=- ) > response time 99th percentile 446 (OK=446 KO=- ) > mean requests/sec 83.333 (OK=83.333 KO=- ) ---- Response Time Distribution ------------------------------------------------ > t 800 ms t > 1200 ms 2 ( 0%) > failed 0 ( 0%) ================================================================================
== NEW 1 RUN =================================================================== ---- Global Information -------------------------------------------------------- > request count 5000 (OK=5000 KO=0 ) > min response time 4 (OK=4 KO=- ) > max response time 6210 (OK=6210 KO=- ) > mean response time 44 (OK=44 KO=- ) > std deviation 178 (OK=178 KO=- ) > response time 50th percentile 20 (OK=20 KO=- ) > response time 75th percentile 39 (OK=39 KO=- ) > response time 95th percentile 114 (OK=114 KO=- ) > response time 99th percentile 350 (OK=350 KO=- ) > mean requests/sec 104.167 (OK=104.167 KO=- ) ---- Response Time Distribution ------------------------------------------------ > t 800 ms t > 1200 ms 14 ( 0%) > failed 0 ( 0%) ================================================================================
== NEW 3 RUNS ================================================================== ---- Global Information -------------------------------------------------------- > request count 5000 (OK=5000 KO=0 ) > min response time 3 (OK=3 KO=- ) > max response time 407 (OK=407 KO=- ) > mean response time 18 (OK=18 KO=- ) > std deviation 25 (OK=25 KO=- ) > response time 50th percentile 11 (OK=11 KO=- ) > response time 75th percentile 17 (OK=17 KO=- ) > response time 95th percentile 53 (OK=53 KO=- ) > response time 99th percentile 139 (OK=139 KO=- ) > mean requests/sec 250 (OK=250 KO=- ) ---- Response Time Distribution ------------------------------------------------ > t 800 ms t > 1200 ms 0 ( 0%) > failed 0 ( 0%) ================================================================================
@amvanbaren could you please share what you used to get this benchmark so I could try to reproduce? 🙏
@amvanbaren could you please share what you used to get this benchmark so I could try to reproduce? 🙏
@filiptronicek I've updated the PR with testing steps.
Made a script for downloading a lot of extensions: https://gist.github.com/filiptronicek/fdfc009371401b9d63716759a90887f4 (should be easily tweak-able for changing download amount as well as output directory).
@amvanbaren is there a separate issue to go along with this PR? Priority?
Issue #379 comes close. I've added a priority.
I've tested this on staging. It looks like the load balancer is doing the heavy lifting, because the results are more or less the same. It can still be useful for #670 though.
== CURRENT ===================================================================== ---- Global Information -------------------------------------------------------- > request count 5000 (OK=4244 KO=756 ) > min response time 141 (OK=141 KO=144 ) > max response time 1507 (OK=1507 KO=502 ) > mean response time 175 (OK=178 KO=161 ) > std deviation 97 (OK=104 KO=37 ) > response time 50th percentile 150 (OK=150 KO=155 ) > response time 75th percentile 157 (OK=156 KO=162 ) > response time 95th percentile 305 (OK=312 KO=176 ) > response time 99th percentile 627 (OK=734 KO=459 ) > mean requests/sec 27.933 (OK=23.709 KO=4.223 ) ---- Response Time Distribution ------------------------------------------------ > t 800 ms t > 1200 ms 1 ( 0%) > failed 756 ( 15%) ---- Errors -------------------------------------------------------------------- > status.find.in(200,201,202,203,204,205,206,207,208,209,304), f 581 (76,85%) ound 400 > status.find.in(200,201,202,203,204,205,206,207,208,209,304), f 175 (23,15%) ound 429 ================================================================================
== SEARCH CACHE ================================================================ ---- Global Information -------------------------------------------------------- > request count 5000 (OK=4244 KO=756 ) > min response time 142 (OK=142 KO=144 ) > max response time 1962 (OK=1962 KO=611 ) > mean response time 184 (OK=188 KO=158 ) > std deviation 128 (OK=138 KO=35 ) > response time 50th percentile 150 (OK=149 KO=152 ) > response time 75th percentile 156 (OK=155 KO=159 ) > response time 95th percentile 448 (OK=456 KO=172 ) > response time 99th percentile 761 (OK=870 KO=308 ) > mean requests/sec 26.738 (OK=22.695 KO=4.043 ) ---- Response Time Distribution ------------------------------------------------ > t 800 ms t > 1200 ms 10 ( 0%) > failed 756 ( 15%) ---- Errors -------------------------------------------------------------------- > status.find.in(200,201,202,203,204,205,206,207,208,209,304), f 568 (75,13%) ound 400 > status.find.in(200,201,202,203,204,205,206,207,208,209,304), f 188 (24,87%) ound 429 ================================================================================