Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Store executino time as an IntField in ms so we can filter on it.

  • Loading branch information...
commit 281712346b3eb284b4542123f8afea49d39c8388 1 parent 200b6cc
Thomas Steinacher thomasst authored
2  README.md
View
@@ -46,7 +46,7 @@ The following query shows all requests that took longer than one second to execu
```
from flask.ext.tracking.documents import Tracking
-Tracking.objects.filter(execution_time__gte='1.0')
+Tracking.objects.filter(execution_time__gte=1000)
```
The following query shows all requests that were served between 23:40 and 23:45 UTC on October 22th, 2012:
2  flask_tracking/__init__.py
View
@@ -57,7 +57,7 @@ def track_after(self, response):
ua = request.user_agent
if getattr(request, '_start_time', None):
- execution_time = time.time() - request._start_time
+ execution_time = int((time.time() - request._start_time) * 1000)
else:
execution_time = None
3  flask_tracking/documents.py
View
@@ -25,7 +25,8 @@ class Tracking(Document):
response_headers = ListField()
response_body = BinaryField()
- execution_time = DecimalField()
+ # Execution time in ms
+ execution_time = IntField()
custom_data = DynamicField()
Please sign in to comment.
Something went wrong with that request. Please try again.