Skip to main content

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.

build

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

License

Project details


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)

Uploaded Source

Built Distribution

py_grpc_profile-0.1.3-py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page