nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #03244
[Bug 1072379] [NEW] Report test execution time at a higher resolution
Public bug reported:
Currently, we measure test execution time using DateTime.Now, which
depends on the System Timer. Per the docs, that gives us a resolution of
10ms, although it seems higher in practice, probably due to context
switching time.
Really, if we want a good measure of how long it took to run a test, we
should probably be using the Stopwatch class.
While we are at it, we should probably use a TimeSpan rather than a double to represent elapsed time in the TestResult class,
at least in NUnit 3.0, and possibly in the other projects as well. The NUnit 2.6 XML should continue to report time in seconds, while the NUnit 3.0 XML can use a string representation of the TimeSpan.
** Affects: nunit-3.0
Importance: High
Status: Triaged
** Affects: nunitlite
Importance: High
Status: Triaged
** Affects: nunitv2
Importance: High
Status: Triaged
** Changed in: nunitv2
Status: New => Triaged
** Changed in: nunitv2
Importance: Undecided => High
** Also affects: nunitlite
Importance: Undecided
Status: New
** Also affects: nunit-3.0
Importance: Undecided
Status: New
** Changed in: nunitlite
Status: New => Triaged
** Changed in: nunitlite
Importance: Undecided => High
** Changed in: nunit-3.0
Status: New => Triaged
** Changed in: nunit-3.0
Importance: Undecided => High
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/1072379
Title:
Report test execution time at a higher resolution
Status in NUnit Test Framework:
Triaged
Status in NUnitLite Testing Framework:
Triaged
Status in NUnit V2 Test Framework:
Triaged
Bug description:
Currently, we measure test execution time using DateTime.Now, which
depends on the System Timer. Per the docs, that gives us a resolution
of 10ms, although it seems higher in practice, probably due to context
switching time.
Really, if we want a good measure of how long it took to run a test,
we should probably be using the Stopwatch class.
While we are at it, we should probably use a TimeSpan rather than a double to represent elapsed time in the TestResult class,
at least in NUnit 3.0, and possibly in the other projects as well. The NUnit 2.6 XML should continue to report time in seconds, while the NUnit 3.0 XML can use a string representation of the TimeSpan.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunit-3.0/+bug/1072379/+subscriptions
Follow ups
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2013-10-11
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2013-10-05
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Tyrel Alastair Hunter, 2013-05-05
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2012-12-24
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Launchpad Bug Tracker, 2012-12-24
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2012-12-24
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Launchpad Bug Tracker, 2012-12-24
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2012-12-23
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2012-12-23
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Geoffroy Querol, 2012-11-15
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2012-11-03
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2012-10-29
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Launchpad Bug Tracker, 2012-10-29
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2012-10-28
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2012-10-28
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Simone Busoli, 2012-10-28
-
[Bug 1072379] Re: Report test execution time at a higher resolution
From: Charlie Poole, 2012-10-28
-
[Bug 1072379] [NEW] Report test execution time at a higher resolution
From: Charlie Poole, 2012-10-28
References