From 30330d86b12031d384556358db8e59d25adebb33 Mon Sep 17 00:00:00 2001 From: David McDonald Date: Thu, 25 Nov 2021 14:49:38 +0000 Subject: [PATCH] Change performance stats to be 2 decimal places We are starting to see lots of 100.0%s in the current table and we think this looks suspiciously too good so think it is beneficial to change it to be 2dp such that we get a few more non 100.0% values. This will put all the values in to having 2dp, however it will also require the API to have a change to https://github.com/alphagov/notifications-api/blob/master/app/performance_dashboard/rest.py#L81 where it is currently losing the granularity down to a single decimal place (meaning that if we were really at 99.894% then that would be shown on the page as 99.90% rather than 99.89%). However, I don't think it is a blocker that we get that sorted before this can be merged. --- app/templates/views/performance.html | 4 ++-- tests/app/main/views/test_performance.py | 30 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/templates/views/performance.html b/app/templates/views/performance.html index c20f99c6e..11e17579d 100644 --- a/app/templates/views/performance.html +++ b/app/templates/views/performance.html @@ -88,7 +88,7 @@
{{ big_number( - '{:.1f}%'.format(average_percentage_under_10_seconds), + '{:.2f}%'.format(average_percentage_under_10_seconds), label='on average', ) }}
@@ -107,7 +107,7 @@ {{ item.date | format_date_normal }} {% endcall %} {% call field() %} - {{ item.percentage_under_10_seconds }}% + {{ '{:.2f}%'.format(item.percentage_under_10_seconds) }} {% endcall %} {% endcall %}