Opened 13 years ago
Closed 10 years ago
#7493 closed enhancement (duplicate)
Implement sage -t --time
Reported by: | nthiery | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | doctest coverage | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | Jeroen Demeyer | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
When a test file takes time to execute, it would be handy to have a quick overview of which specific tests take long.
Something like:
sage -t --verbose --time bla.py Trying: 1+1 Expecting: 2 ok [0.1ms] Trying: factor(....) Expecting: ... ok [10s] warning: please use # long time Trying: factor(.....) # long time Expecting: ... ok [10s] Trying: factor(........) Expecting: ... ok [300s] warning: this is too long!
And in non verbose mode:
sage -t --time bla.py Warning: factor(....) line 30 takes 10s: please use # long time Warning: factor(........) line 50 takes 300s: this is too long!
Attachments (1)
Change History (5)
comment:1 Changed 13 years ago by
Report Upstream: | → N/A |
---|
comment:2 follow-up: 3 Changed 13 years ago by
Nicolas, can you actually attach your toy patch to this ticket? I've now been in a few situations where I'm staring at the output of sage -t -verbose, and having *anything* automated for this would be a great help to my sanity.
Changed 13 years ago by
Attachment: | trac_7493-check-long-time.patch added |
---|
comment:3 Changed 13 years ago by
Replying to AlexGhitza:
Nicolas, can you actually attach your toy patch to this ticket? I've now been in a few situations where I'm staring at the output of sage -t -verbose, and having *anything* automated for this would be a great help to my sanity.
Oops, there it is.
Eh eh, maybe my strategy is going to work :-)
comment:4 Changed 10 years ago by
Milestone: | sage-wishlist → sage-duplicate/invalid/wontfix |
---|---|
Resolution: | → duplicate |
Reviewers: | → Jeroen Demeyer |
Status: | new → closed |
This is essentially all implemented in #12415.
Here is a patch which sorts of do the job. It is not intended to be merged, but to make you crave enough for the feature to actually implement it right: