Firebase trace showing wrong median time latency?

半腔热情 提交于 2019-11-29 12:45:39

95% does not mean 95% of the time, it is the 95th percentile in the value range, not to be confused with frequency.

Most (90%) of your "executions" will be between 5-95% so it makes sense that the median is 647 ms.

I don't know exactly what the 95% value represents, it could be an average of the top 5% execution times or it could be the first value in the range.

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).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!