Skip to content

Instantly share code, notes, and snippets.

21234576 function calls (20715281 primitive calls) in 49.821 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
50847 0.236 0.000 65.993 0.001 queue.py:278(get)
2/1 0.000 0.000 49.687 49.687 threading.py:871(_bootstrap)
2/1 0.000 0.000 49.687 49.687 threading.py:902(_bootstrap_inner)
217/1 0.001 0.000 45.720 45.720 {built-in method builtins.exec}
2/1 0.000 0.000 45.720 45.720 server_simple.py:3(<module>)
lidiz@ddev:google3$ GRPC_VERBOSITY=debug GRPC_TRACE=metadata blaze-out/k8-py3-dbg/bin/third_party/py/grpc/tests_aio/unit/channel_test_opensource --logtostderr
Running tests under Python 3.6.7: embedded.
[ RUN ] TestChannel.test_async_context
In process [208877] thread [<_MainThread(MainThread, started 140346284608192)>], setUp
In process [208877] thread [<_MainThread(MainThread, started 140346284608192)>], start new process
D0905 18:12:55.626506482 208881 metadata.cc:241] shard->count = 0
D0905 18:12:55.626540271 208881 metadata.cc:241] shard->count = 0
D0905 18:12:55.626547992 208881 metadata.cc:241] shard->count = 0
D0905 18:12:55.626555874 208881 metadata.cc:241] shard->count = 0
D0905 18:12:55.626562042 208881 metadata.cc:241] shard->count = 0
### Log
D0325 17:54:23.615673000 140735848788864 dns_resolver_ares.cc:488] Using ares dns resolver
I0325 17:54:23.615757000 140735848788864 init.cc:154] grpc_init(void)
I0325 17:54:23.615826000 140735848788864 ssl_credentials.cc:128] grpc_ssl_credentials_create(pem_root_certs=(null), pem_key_cert_pair=0x0, verify_options=0x0, reserved=0x0)
I0325 17:54:23.615834000 140735848788864 init.cc:154] grpc_init(void)
I0325 17:54:23.615838000 140735848788864 plugin_credentials.cc:249] grpc_metadata_credentials_create_from_plugin(reserved=0x0)
I0325 17:54:23.615846000 140735848788864 composite_credentials.cc:206] grpc_composite_channel_credentials_create(channel_creds=0x7fe96fd10d50, call_creds=0x7fe96fad8a10, reserved=0x0)
I0325 17:54:23.615852000 140735848788864 credentials.cc:43] grpc_channel_credentials_release(creds=0x7fe96fd10d50)
I0325 17:54:23.615874000 140735848788864 credentials.cc:49] grpc_call_credentials_release(creds=0x7fe96fad8a10)
I0325
@lidizheng
lidizheng / how.pyx
Last active January 30, 2019 19:56
### Current Pattern ###
cdef class CClass:
cdef c_struct *c_ptr
cdef c(self, c_struct *c_ptr):
self.c_ptr = c_ptr
# Do stuff
cdef un_c(self):
# Free resource
##### server.py start #####
from concurrent import futures
import time
import logging
import grpc
import chunker_pb2
import chunker_pb2_grpc
Name Stmts Miss Cover
-------------------------------------------------------------------------------------------------------
py37_native/lib/python3.7/site-packages/grpc/__init__.py 276 67 76%
py37_native/lib/python3.7/site-packages/grpc/_auth.py 32 1 97%
py37_native/lib/python3.7/site-packages/grpc/_channel.py 599 55 91%
py37_native/lib/python3.7/site-packages/grpc/_common.py 31 1 97%
py37_native/lib/python3.7/site-packages/grpc/_interceptor.py 253 64 75%
py37_native/lib/python3.7/site-packages/grpc/_plugin_wrapping.py 51 11 78%
py37_native/lib/python3.7/site-packages/grpc/_server.py 543 18 97%
py37_native/lib/python3.7/site-packages/grpc/_utilities.py 9
@lidizheng
lidizheng / gist:5760e92de658260a720191df98f55207
Created January 16, 2019 23:45
gRPC Python Test Branch Coverage
Name Stmts Miss Branch BrPart Cover Missing
-------------------------------------------------------------------------------------------------------------------------------------------------------
/Users/lidiz/src/grpc/py37_native/lib/python3.7/site-packages/grpc/__init__.py 276 67 18 3 76% 28-29, 66, 84, 98, 113, 136, 158, 180, 196, 311, 322, 330, 345, 363, 374, 385, 396, 452, 488, 525, 561, 613, 630, 692, 721, 749, 780, 814, 844, 872, 903, 935, 945, 965, 985, 1005, 1025, 1036, 1052, 1062, 1075, 1088, 1097, 1109, 1121, 1140, 1159, 1171, 1184, 1248, 1268, 1296, 1315, 1332, 1350, 1358, 1388, 1598, 1601, 1634, 1844-1845, 1849-1850, 1854-1855, 1597->1598, 1600->1601, 1627->1634
/Users/lidiz/src/grpc/py37_native/lib/python3.7/site-packages/grpc/_auth.py 32 1 2 1 94% 55, 54->55
/Users/lidiz/src/grpc/py37_na