profile the grpc server
Project description
py-grpc-profile
Profile the grpc server.
Provide a grpc interceptor to profile each request in the cProfile module.
Installation
$ pip install -U py-grpc-profile
Example
Load the module and set the interceptors.
from concurrent import futures
import grpc
from py_grpc_profile.server.interceptor import ProfileInterceptor
# ...
server = grpc.server(
futures.ThreadPoolExecutor(max_workers=10),
interceptors=[ProfileInterceptor()],
)
# ...
The complete code is available in example. You can find more details there.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-grpc-profile-0.1.3.tar.gz
(7.6 kB
view hashes)
Built Distribution
Close
Hashes for py_grpc_profile-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e0118d9cb2ecbea2293441e807717d1c8c707027886082d331a26a9e222d3a2 |
|
MD5 | 7d799ef8bb8a1e45729157531daf0973 |
|
BLAKE2b-256 | 93eafe2bf93a3a25d97d7faea4c9fdc62640127ca457a7c9a6a15697a302819f |