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

Can we get how much a program took to execute in Piston? #464

Closed
gouseferoz opened this issue Mar 27, 2022 · 5 comments
Closed

Can we get how much a program took to execute in Piston? #464

gouseferoz opened this issue Mar 27, 2022 · 5 comments

Comments

@gouseferoz
Copy link

Is there a way to record the time took for a program to execute in piston?

@Vrganj
Copy link
Contributor

Vrganj commented Mar 27, 2022

Not as of right now, but it would be trivial to implement. I suppose you can check how long it takes for the request to finish, but that includes the network latency. Though, a pull request would be appreciated.

@realtux
Copy link
Member

realtux commented Mar 27, 2022

the problem with this is the resulting execution time wouldn't be overly useful right now. piston by default is optimized for safety and availability. execution speed is directly related to the resources involved in the execution, which vary greatly between machines and is limited in the piston execution environment (for safety). to get consistent execution numbers that are unbound by limits would require piston supporting a sort of unsafe environment that has unlimited resources and no time limits. this is something piston doesn't currently support but may in the future, although there's no plans to do so at the moment.

@crbonilha
Copy link

even though resources are limited (for safety), aren't they limited consistently across multiple runs on the same machine?
if so, then having the runtime information on the response would be useful.

@smark-1
Copy link

smark-1 commented Sep 20, 2024

#683 adds to the execution response the cpu_time, wall_time, and memory

@Brikaa
Copy link
Member

Brikaa commented Sep 20, 2024

@Brikaa Brikaa closed this as completed Sep 20, 2024
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

6 participants