trial Reporter which shows per-test times #634

Closed
opened 2009-02-18 22:21:35 +00:00 by warner · 2 comments

I've been casually trying to speed up our unit test suite, and it would help me focus my attention if the Reporter class could tell me which tests were taking the most time (especially on the slower buildslaves, where I'm not watching the output in realtime).

So it's be nice if there were a Reporter class which would emit the elapsed time of each test case, right next to the OK line, something like:

allmydata.test.test_system
  SystemTest
    test_mutable ...                    [OK] 2.12s

We have a custom Reporter class for figleaf already, so it shouldn't be too hard to build this one.

I'd want to run this on all the buildbot builds. I'm not sure I'd want to make it the default for 'make test', but maybe it wouldn't be too distracting.

I've been casually trying to speed up our unit test suite, and it would help me focus my attention if the Reporter class could tell me which tests were taking the most time (especially on the slower buildslaves, where I'm not watching the output in realtime). So it's be nice if there were a Reporter class which would emit the elapsed time of each test case, right next to the `OK` line, something like: ``` allmydata.test.test_system SystemTest test_mutable ... [OK] 2.12s ``` We have a custom Reporter class for figleaf already, so it shouldn't be too hard to build this one. I'd want to run this on all the buildbot builds. I'm not sure I'd want to make it the default for 'make test', but maybe it wouldn't be too distracting.
warner added the
dev-infrastructure
minor
enhancement
1.3.0
labels 2009-02-18 22:21:35 +00:00
warner added this to the undecided milestone 2009-02-18 22:21:35 +00:00
warner self-assigned this 2009-02-18 22:21:35 +00:00
Author

Oh, hey, look at that. Trial has had this built-in since at least Twisted-2.3.0, using --reporter=timing. The output looks different, but it's close enough for me:

allmydata.test.test_crawler.Basic.test_cpu_usage ... [OK]
(4.220 secs)
allmydata.test.test_crawler.Basic.test_empty_subclass ... [OK]
(0.899 secs)

I think I'll switch the buildslaves to use this reporter.

Oh, hey, look at that. Trial has had this built-in since at least Twisted-2.3.0, using `--reporter=timing`. The output looks different, but it's close enough for me: ``` allmydata.test.test_crawler.Basic.test_cpu_usage ... [OK] (4.220 secs) allmydata.test.test_crawler.Basic.test_empty_subclass ... [OK] (0.899 secs) ``` I think I'll switch the buildslaves to use this reporter.
Author

that works great

that works great
warner added the
fixed
label 2009-02-19 05:44:05 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#634
No description provided.