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

Calculate runtime of exited process more accurately #15

Open
amwolff opened this issue Aug 2, 2017 · 0 comments
Open

Calculate runtime of exited process more accurately #15

amwolff opened this issue Aug 2, 2017 · 0 comments

Comments

@amwolff
Copy link
Collaborator

amwolff commented Aug 2, 2017

Currently, runtime is calculated as follows:

start := time.Now()
err = process.Run()
ret.Runtime = time.Since(start)

This duration includes time for function call and so on. It is probably inaccurate.

We should use User and System Time to calculate runtime of the process (source) using os package builtin methods (link). More precisely, sum of User and Sys time.

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