← Back to team overview

sts-sponsors team mailing list archive

[Merge] ~ack/maas:perftest-query-time-always-float into maas:master

 

Alberto Donato has proposed merging ~ack/maas:perftest-query-time-always-float into maas:master.

Commit message:
perftest: ensure the query_time metric is always a float value



Requested reviews:
  Björn Tillenius (bjornt)

For more details, see:
https://code.launchpad.net/~ack/maas/+git/maas/+merge/435455
-- 
Your team MAAS Committers is subscribed to branch maas:master.
diff --git a/src/maastesting/pytest/perftest.py b/src/maastesting/pytest/perftest.py
index d26345d..5ddc9b2 100644
--- a/src/maastesting/pytest/perftest.py
+++ b/src/maastesting/pytest/perftest.py
@@ -137,8 +137,8 @@ class QueryCounter(PerfTracer):
         from django.db import connection
 
         self._count = len(connection.queries)
-        self._time = sum(
-            (float(entry["time"]) for entry in connection.queries)
+        self._time = float(
+            sum((float(entry["time"]) for entry in connection.queries))
         )
 
     def results(self):

References