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

Add profile flag and profile ple/interpreter/solver #568

Closed
wants to merge 1 commit into from

Conversation

Fizzixnerd
Copy link
Contributor

Related to #539.

Adds a --profile flag, which when provided will output some basic profiling information, such as how much time was spent in the IO of the PLE, PLE interpreter, and overall in the solver.

beforeTime <- liftIO getCurrentTime
ret <- m
afterTime <- liftIO $ getCurrentTime
when shouldProfile $ liftIO $ putStrLn $ header <> show (afterTime `diffUTCTime` beforeTime)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will work better to collect these measures somewhere and print them at the end of the verification. Also, I imagine that we will want to add up a few of these measures when we call multiple times to the same function.

@@ -144,6 +145,7 @@ library
, unordered-containers
, aeson
, rest-rewrite >= 0.1.1
, time
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we should be using the clock package instead of time since we don't care of time zones or days.

@facundominguez
Copy link
Collaborator

Since this PR, timestats was released, which could be simpler to use.

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

Successfully merging this pull request may close these issues.

2 participants