zapier / prom-aggregation-gateway

An aggregating push gateway for Prometheus
Mozilla Public License 2.0
116 stars 26 forks source link

Add a k6.io benchmark #48

Closed sontek closed 1 year ago

sontek commented 1 year ago

We can use these benchmarks to run against any push gateway and compare our performance since they aren't build in golang benchmarks.

❯ k6 run -e PAG_HOST=http://localhost --vus 10 --duration 30s  benchmarking/perf1.js

          /\      |‾‾| /‾‾/   /‾‾/   
     /\  /  \     |  |/  /   /  /    
    /  \/    \    |     (   /   ‾‾\  
   /          \   |  |\  \ |  (‾)  | 
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: benchmarking/perf1.js
     output: -

  scenarios: (100.00%) 1 scenario, 10 max VUs, 1m0s max duration (incl. graceful stop):
           * default: 10 looping VUs for 30s (gracefulStop: 30s)

running (0m30.0s), 00/10 VUs, 1285837 complete and 0 interrupted iterations
default ✓ [======================================] 10 VUs  30s

     ✓ status was 202

     checks.........................: 100.00% ✓ 1285837      ✗ 0      
     data_received..................: 104 MB  3.5 MB/s
     data_sent......................: 470 MB  16 MB/s
     http_req_blocked...............: avg=675ns    min=0s      med=0s       max=2.64ms  p(90)=1µs     p(95)=1µs    
     http_req_connecting............: avg=2ns      min=0s      med=0s       max=384µs   p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=199.2µs  min=29µs    med=143µs    max=14.65ms p(90)=383µs   p(95)=502µs  
       { expected_response:true }...: avg=199.2µs  min=29µs    med=143µs    max=14.65ms p(90)=383µs   p(95)=502µs  
     http_req_failed................: 0.00%   ✓ 0            ✗ 1285837
     http_req_receiving.............: avg=5.63µs   min=2µs     med=4µs      max=8.56ms  p(90)=7µs     p(95)=10µs   
     http_req_sending...............: avg=3.33µs   min=1µs     med=2µs      max=7.73ms  p(90)=4µs     p(95)=7µs    
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s      p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=190.24µs min=24µs    med=134µs    max=14.64ms p(90)=373µs   p(95)=490µs  
     http_reqs......................: 1285837 42860.676145/s
     iteration_duration.............: avg=231µs    min=46.91µs med=173.58µs max=14.67ms p(90)=420.5µs p(95)=541.7µs
     iterations.....................: 1285837 42860.676145/s
     vus............................: 10      min=10         max=10   
     vus_max........................: 10      min=10         max=10