pagerduty-cli icon indicating copy to clipboard operation
pagerduty-cli copied to clipboard

Incident list api very slow?

Open asportnoy opened this issue 2 years ago • 2 comments

This lookup consistently takes around 2 seconds which is not ideal. Would it be possible to speed that up at all? Screenshot 2023-09-05 at 15 55 30

asportnoy avatar Sep 05 '23 20:09 asportnoy

Hi, when I run the command I get it to consistently return within a second. One thought is to use the "since=yesterday" filter to narrow the range for the query. I'm curious, what are you using to capture your "time"?

Here's my output jcalcada@jcalcada-C02F84BLML85 ~ % time pd incident list --me --since=yesterday Getting incidents 1/1 👍, 0/1 👎... done › Error: No incidents found pd incident list --me --since=yesterday 0.61s user 0.20s system 36% cpu 2.209 total jcalcada@jcalcada-C02F84BLML85 ~ % time pd incident list --me
Getting incidents 1/1 👍, 0/1 👎... done › Error: No incidents found pd incident list --me 0.65s user 0.39s system 35% cpu 2.934 total

jcalcada avatar Sep 06 '23 13:09 jcalcada

Adding --since=yesterday doesn't give much of an imorovement.

I am using the time command (fish shell, but bash has the same command) to calculate the duration.

asportnoy avatar Sep 06 '23 14:09 asportnoy