Skip to content

Commit

Permalink
Merge pull request #92 from deep-compute/Kwikapi_timing_headers
Browse files Browse the repository at this point in the history
add serialize to total kwikapi timings
  • Loading branch information
sriharsha-kms authored May 17, 2019
2 parents 379be82 + 92ea864 commit 918116f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ deploy:
- LICENSE
- kwikapi/api.py
- kwikapi/__init__.py
name: kwikapi-0.5.7
tag_name: 0.5.7
name: kwikapi-0.5.8
tag_name: 0.5.8
on:
repo: deep-compute/kwikapi
- provider: pypi
Expand Down
4 changes: 2 additions & 2 deletions kwikapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,6 @@ def handle_request(self, request):

tcompute = time.time() - tcompute

response.headers[TIMING_HEADER] = str(tcompute)

# Serialize the response
if request.fn.__func__.func_info['gives_stream']:
result = self._wrap_stream(request, result) if protocol.should_wrap() else result
Expand All @@ -556,6 +554,8 @@ def handle_request(self, request):
result = dict(success=True, result=result) if protocol.should_wrap() else result
n, t = response.write(result, protocol)

response.headers[TIMING_HEADER] = str(tcompute + t.value)

request.log.info('kwikapi.handle_request',
function=rinfo.function, namespace=rinfo.namespace,
method=rinfo.method, compute_time=tcompute, serialize_time=t.value,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

version = '0.5.7'
version = '0.5.8'
setup(
name="kwikapi",
version=version,
Expand Down

0 comments on commit 918116f

Please sign in to comment.