Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

get data from each api #79

Closed
XuCcc opened this issue Jan 28, 2021 · 1 comment
Closed

get data from each api #79

XuCcc opened this issue Jan 28, 2021 · 1 comment

Comments

@XuCcc
Copy link

XuCcc commented Jan 28, 2021

i have many apis in postman, postman2k6 and k6 just give the summary of all the apis.

i want to get the duration of each apis,

is there any good ideas?

running (00m14.9s), 0/1 VUs, 1 complete and 0 interrupted iterations
default ✓ [======================================] 1 VUs  00m14.9s/10m0s  1/1 iters, 1 per VU

    █ BaseInfo

    █ Product

    █ Design

    █ Task

      █ Service

      █ Tools

    █ Report

    data_received..............: 538 kB 36 kB/s
    data_sent..................: 13 MB  851 kB/s
    group_duration.............: avg=3.35s    min=35.93ms med=1.67s    max=11.97s   p(90)=8.01s    p(95)=9.99s
    http_req_blocked...........: avg=3.32ms   min=0s      med=0s       max=130.62ms p(90)=0s       p(95)=0s
    http_req_connecting........: avg=703.94µs min=0s      med=0s       max=30.91ms  p(90)=0s       p(95)=0s
    http_req_duration..........: avg=287.33ms min=5.98ms  med=238.43ms max=1.9s     p(90)=532.75ms p(95)=875.7ms
    http_req_receiving.........: avg=476.87µs min=0s      med=0s       max=9.71ms   p(90)=873.8µs  p(95)=3.38ms
    http_req_sending...........: avg=1.79ms   min=0s      med=0s       max=89.75ms  p(90)=0s       p(95)=498.25µs
    http_req_tls_handshaking...: avg=1.93ms   min=0s      med=0s       max=67.82ms  p(90)=0s       p(95)=0s
    http_req_waiting...........: avg=285.06ms min=5.98ms  med=238.43ms max=1.9s     p(90)=532.75ms p(95)=830.82ms
    http_reqs..................: 51     3.425009/s
    iteration_duration.........: avg=14.85s   min=14.85s  med=14.85s   max=14.85s   p(90)=14.85s   p(95)=14.85s
    iterations.................: 1      0.067157/s
    vus........................: 1      min=1 max=1
    vus_max....................: 1      min=1 max=1
@simskij
Copy link
Contributor

simskij commented Apr 22, 2021

Hey!

Thank you for the report! You can do this either with a custom metric or by defining some kind of threshold for the duration of a specific URL. See either https://k6.io/docs/using-k6/metrics/#custom-metrics (you'll likely want to use a Trend for this), or https://k6.io/docs/using-k6/thresholds/ and https://k6.io/docs/using-k6/tags-and-groups/#system-tags

Best,
Simme

@simskij simskij closed this as completed Apr 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants