From 1a0ed7fdecd453131263133d075ae1d881b0bc77 Mon Sep 17 00:00:00 2001 From: Albert Wang Date: Thu, 15 Aug 2024 01:19:27 -0700 Subject: [PATCH] Annotate time_taken fields as milliseconds rather than seconds (#726) --- silk/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/silk/models.py b/silk/models.py index 0c28cad0..c4d245f1 100644 --- a/silk/models.py +++ b/silk/models.py @@ -83,7 +83,7 @@ class Request(models.Model): default='', null=True ) end_time = DateTimeField(null=True, blank=True) - time_taken = FloatField(blank=True, null=True) + time_taken = FloatField(blank=True, null=True) # milliseconds encoded_headers = TextField(blank=True, default='') # stores json meta_time = FloatField(null=True, blank=True) meta_num_queries = IntegerField(null=True, blank=True) @@ -252,7 +252,7 @@ class SQLQuery(models.Model): query = TextField() start_time = DateTimeField(null=True, blank=True, default=timezone.now) end_time = DateTimeField(null=True, blank=True) - time_taken = FloatField(blank=True, null=True) + time_taken = FloatField(blank=True, null=True) # milliseconds identifier = IntegerField(default=-1) request = ForeignKey( Request, related_name='queries', null=True, @@ -350,7 +350,7 @@ class BaseProfile(models.Model): Request, null=True, blank=True, db_index=True, on_delete=models.CASCADE, ) - time_taken = FloatField(blank=True, null=True) + time_taken = FloatField(blank=True, null=True) # milliseconds class Meta: abstract = True