Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start/Stop on demand #512

Open
pom11 opened this issue Dec 11, 2022 · 0 comments
Open

Start/Stop on demand #512

pom11 opened this issue Dec 11, 2022 · 0 comments

Comments

@pom11
Copy link

pom11 commented Dec 11, 2022

AWS and GCP provide a Serverless service where a server in a container starts on demand. This container has a default timeout that, usually, allows Scalene to profile the current job and not raise a job was too fast error. If there are no requests to the service the container stops.

Given that mostly all server frameworks (flask, sanic etc) have on_server_start and on_server_stop custom functions, would be nice to profile in production starting/stopping Scalene in these custom functions. (--profile-interval < container default timeout)

I've tested using scalene in GCP Cloud Run with CMD python -m scalene --profile-interval 2.0 --cli --html --outfile scalene.html app.py and failed to start the container even tho the CPU is always allocated (not allocated only during request processing).

#483 #432 #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant