Merge pull request #4079 from alphagov/2dp-performance-page

Change performance stats to be 2 decimal places
This commit is contained in:
David McDonald
2021-11-25 16:12:11 +00:00
committed by GitHub
2 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -88,7 +88,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-one-half"> <div class="govuk-grid-column-one-half">
{{ big_number( {{ big_number(
'{:.1f}%'.format(average_percentage_under_10_seconds), '{:.2f}%'.format(average_percentage_under_10_seconds),
label='on average', label='on average',
) }} ) }}
</div> </div>
@@ -107,7 +107,7 @@
{{ item.date | format_date_normal }} {{ item.date | format_date_normal }}
{% endcall %} {% endcall %}
{% call field() %} {% call field() %}
{{ item.percentage_under_10_seconds }}% {{ '{:.2f}%'.format(item.percentage_under_10_seconds) }}
{% endcall %} {% endcall %}
{% endcall %} {% endcall %}
<p class="table-show-more-link"> <p class="table-show-more-link">
+15 -15
View File
@@ -47,31 +47,31 @@ def _get_example_performance_data():
"processing_time": [ "processing_time": [
{ {
"date": "2021-02-21", "date": "2021-02-21",
"percentage_under_10_seconds": 99.2 "percentage_under_10_seconds": 99.25
}, },
{ {
"date": "2021-02-22", "date": "2021-02-22",
"percentage_under_10_seconds": 95.3 "percentage_under_10_seconds": 95.30
}, },
{ {
"date": "2021-02-23", "date": "2021-02-23",
"percentage_under_10_seconds": 95.6 "percentage_under_10_seconds": 95.0
}, },
{ {
"date": "2021-02-24", "date": "2021-02-24",
"percentage_under_10_seconds": 96.7 "percentage_under_10_seconds": 100.0
}, },
{ {
"date": "2021-02-25", "date": "2021-02-25",
"percentage_under_10_seconds": 95.7 "percentage_under_10_seconds": 99.99
}, },
{ {
"date": "2021-02-26", "date": "2021-02-26",
"percentage_under_10_seconds": 96.5 "percentage_under_10_seconds": 100.0
}, },
{ {
"date": "2021-02-27", "date": "2021-02-27",
"percentage_under_10_seconds": 98.6 "percentage_under_10_seconds": 98.60
}, },
], ],
"services_using_notify": [ "services_using_notify": [
@@ -144,16 +144,16 @@ def test_should_render_performance_page(
'Only showing the last 7 days ' 'Only showing the last 7 days '
'' ''
'Messages sent within 10 seconds ' 'Messages sent within 10 seconds '
'96.8% on average ' '98.31% on average '
'Messages sent within 10 seconds ' 'Messages sent within 10 seconds '
'Date Percentage ' 'Date Percentage '
'27 February 2021 98.6% ' '27 February 2021 98.60% '
'26 February 2021 96.5% ' '26 February 2021 100.00% '
'25 February 2021 95.7% ' '25 February 2021 99.99% '
'24 February 2021 96.7% ' '24 February 2021 100.00% '
'23 February 2021 95.6% ' '23 February 2021 95.00% '
'22 February 2021 95.3% ' '22 February 2021 95.30% '
'21 February 2021 99.2% ' '21 February 2021 99.25% '
'Only showing the last 7 days ' 'Only showing the last 7 days '
'' ''
'Organisations using Notify ' 'Organisations using Notify '