mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Use time.perf_counter() instead of time.time(), closes #1157
This commit is contained in:
parent
dcdfb2c301
commit
810853c5f2
3 changed files with 8 additions and 8 deletions
|
|
@ -425,7 +425,7 @@ class DataView(BaseView):
|
|||
kwargs["default_labels"] = True
|
||||
|
||||
extra_template_data = {}
|
||||
start = time.time()
|
||||
start = time.perf_counter()
|
||||
status_code = 200
|
||||
templates = []
|
||||
try:
|
||||
|
|
@ -457,7 +457,7 @@ class DataView(BaseView):
|
|||
except DatasetteError:
|
||||
raise
|
||||
|
||||
end = time.time()
|
||||
end = time.perf_counter()
|
||||
data["query_ms"] = (end - start) * 1000
|
||||
for key in ("source", "source_url", "license", "license_url"):
|
||||
value = self.ds.metadata(key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue