test.check

quick-check should report how long it ran

Details

  • Type: Enhancement Enhancement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:

Description

Just an extra key in the return value, showing milliseconds that it was running.

Could maybe also add a key to the shrunk map saying how long it spent shrinking.

Activity

Hide
Unnikrishnan Geethagovindan added a comment -

Adding

  • :time-elapsed "100 ms" for success
  • :failed-after "2 ms" for failure
    • :time-spent-shrinking "2 ms" for time spent shrinking

or would a common key :elapsed "10 ms" would be better for all the 3 cases ?

Show
Unnikrishnan Geethagovindan added a comment - Adding
  • :time-elapsed "100 ms" for success
  • :failed-after "2 ms" for failure
    • :time-spent-shrinking "2 ms" for time spent shrinking
or would a common key :elapsed "10 ms" would be better for all the 3 cases ?
Hide
Nicolás Berger added a comment -

I think this feature could be implemented as a reporter-fn. It doesn't even need to be in the c.t.check or c.t.c.clojure-test namespace.

Show
Nicolás Berger added a comment - I think this feature could be implemented as a reporter-fn. It doesn't even need to be in the c.t.check or c.t.c.clojure-test namespace.
Hide
Gary Fredericks added a comment -

Unnikrishnan, I apologize I somehow didn't see this patch until now.

I like the approach, except that I'd prefer to append -ms to the keywords and have the values be integers, instead of strings. I also had trouble applying the patch, even to some commits from around the time you posted it.

If you can post an updated patch in the next couple weeks, I'll apply it. Otherwise I'll go ahead and make the changes myself.

Thanks for the patch!

Show
Gary Fredericks added a comment - Unnikrishnan, I apologize I somehow didn't see this patch until now. I like the approach, except that I'd prefer to append -ms to the keywords and have the values be integers, instead of strings. I also had trouble applying the patch, even to some commits from around the time you posted it. If you can post an updated patch in the next couple weeks, I'll apply it. Otherwise I'll go ahead and make the changes myself. Thanks for the patch!
Hide
Gary Fredericks added a comment -

Committed to master as 51ae80a915. Thanks again!

Show
Gary Fredericks added a comment - Committed to master as 51ae80a915. Thanks again!

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: