mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-10-21 13:31:19 +00:00
imp: use numbers for the parsed perf_info fields
This commit is contained in:
1 parent
13ed529d71
commit
385a9c9c55
1 file changed
+4
-2
@@ -31,8 +31,10 @@ class OdooJsonFormatter(jsonlogger.JsonFormatter):
|
|||||||
record.perf_info = getattr(record, 'perf_info', '')
|
record.perf_info = getattr(record, 'perf_info', '')
|
||||||
if record.perf_info:
|
if record.perf_info:
|
||||||
nb_queries, time_sql, time_python = record.perf_info.split()
|
nb_queries, time_sql, time_python = record.perf_info.split()
|
||||||
time_total = str(float(time_sql) + float(time_python))
|
time_sql = float(time_sql)
|
||||||
record.perf_info_nb_queries = nb_queries
|
time_python = float(time_python)
|
||||||
|
time_total = time_sql + time_python
|
||||||
|
record.perf_info_nb_queries = int(nb_queries)
|
||||||
record.perf_info_time_sql = time_sql
|
record.perf_info_time_sql = time_sql
|
||||||
record.perf_info_time_python = time_python
|
record.perf_info_time_python = time_python
|
||||||
record.perf_info_time_total = time_total
|
record.perf_info_time_total = time_total
|
||||||
|
|||||||