Firebase trace showing wrong median time latency?

后端 未结 2 681
囚心锁ツ
囚心锁ツ 2020-12-20 08:20

I am adding Firebase performance trace in my app and below image is data for last 24 Hrs

As you can see the Median is 647ms<

2条回答
  •  暖寄归人
    2020-12-20 08:47

    I think the behavior that you are facing is this:

    You are sending this metrics (sorted):

    Day 1: ..., 460ms, ..., ..., 647ms, ..., ..., 14.81s, ... 5th 50th 95th

    That explains the first graph, in the next days you are sending different total number of metrics. (I set some random numbers):

    Day 2: ..., 460ms, ..., ..., 647ms, ..., ..., 2.95s, ... 5th 50th 95th

    Day 3: ..., 460ms, ..., ..., 647ms, ..., ..., 2.95s, ... 5th 50th 95th

    Day 4: ..., 619ms, ..., ..., 971ms, ..., ..., 5.95s, ... 5th 50th 95th

    Day 5: ..., 460ms, ..., ..., 647ms, ..., ..., 2.94s, ... 5th 50th 95th

    Day 6: ..., 460ms, ..., ..., 647ms, ..., ..., 2.01s, ... 5th 50th 95th

    That could explain second graph, and since the third graph shows a distribution across 7 days (merge all your metrics into a single array and computes the percentiles), that explains how the 95th which it should be different than most of your every day 95th (unless the metrics that you send are the same every day).

    In addition I noticed that you in fact can check the 100th in the response of the network request made by the Firebase Console from your browser, (I think UI decided to don't render this value).

提交回复
热议问题