Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate time_taken fields as milliseconds rather than seconds #726

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions silk/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -345,7 +345,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
Expand Down
Loading