You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2011/12/14 18:57:13 UTC
DO NOT REPLY [Bug 52333] New: Consider how to reduce overhead in
calculating SampleResult#nanoTimeOffset
https://issues.apache.org/bugzilla/show_bug.cgi?id=52333
Bug #: 52333
Summary: Consider how to reduce overhead in calculating
SampleResult#nanoTimeOffset
Product: JMeter
Version: 2.5.1
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Main
AssignedTo: issues@jmeter.apache.org
ReportedBy: sebb@apache.org
Classification: Unclassified
When using System.nanoTime(), the SampleResult ctors calculate the current
offset from currentTimeMillis().
This was previously done just once when the class was initialised, but this was
found to cause problems because of drift - see Bug 51855.
Consider using a background thread to calculate the offset, rather than
calculating it for each sample - this should reduce the overhead for high
sample rates. So long as the time between refreshes is kept reasonably low,
drift should not be sufficient to cause an issue.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 52333] Consider how to reduce overhead in
calculating SampleResult#nanoTimeOffset
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52333
--- Comment #1 from Sebb <se...@apache.org> 2011-12-14 19:55:00 UTC ---
Note: it looks like Thread.sleep() returns to the thread shortly after a clock
transition (as might be expected).
Calculating the nanoTime offset immediately afterwards should ensure more
consistent values.
With the current implementation - which may call currentTimeMills at any point
in the clock cycle - the granularity of currentTimeMillis (generally 10ms-15ms)
means that the offset can vary by that amount.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Re: DO NOT REPLY [Bug 52333] New: Consider how to reduce overhead in
calculating SampleResult#nanoTimeOffset
Posted by sebb <se...@gmail.com>.
I created the bug to ensure it's not forgotten.
I'm working on it at present.
On 14 December 2011 17:57, <bu...@apache.org> wrote:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=52333
>
> Bug #: 52333
> Summary: Consider how to reduce overhead in calculating
> SampleResult#nanoTimeOffset
> Product: JMeter
> Version: 2.5.1
> Platform: PC
> OS/Version: All
> Status: NEW
> Severity: enhancement
> Priority: P2
> Component: Main
> AssignedTo: issues@jmeter.apache.org
> ReportedBy: sebb@apache.org
> Classification: Unclassified
>
>
> When using System.nanoTime(), the SampleResult ctors calculate the current
> offset from currentTimeMillis().
>
> This was previously done just once when the class was initialised, but this was
> found to cause problems because of drift - see Bug 51855.
>
> Consider using a background thread to calculate the offset, rather than
> calculating it for each sample - this should reduce the overhead for high
> sample rates. So long as the time between refreshes is kept reasonably low,
> drift should not be sufficient to cause an issue.
>
> --
> Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug.
DO NOT REPLY [Bug 52333] Reduce overhead in calculating
SampleResult#nanoTimeOffset
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52333
Sebb <se...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Consider how to reduce |Reduce overhead in
|overhead in calculating |calculating
|SampleResult#nanoTimeOffset |SampleResult#nanoTimeOffset
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 52333] Reduce overhead in calculating
SampleResult#nanoTimeOffset
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52333
Sebb <se...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Sebb <se...@apache.org> 2011-12-17 00:17:01 UTC ---
URL: http://svn.apache.org/viewvc?rev=1215361&view=rev
Log:
Bug 52333 - Reduce overhead in calculating SampleResult#nanoTimeOffset
Use a background thread to calculate the offset instead of doing it each sample
Modified:
jmeter/trunk/bin/jmeter.properties
jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java
jmeter/trunk/xdocs/changes.xml
jmeter/trunk/xdocs/usermanual/listeners.xml
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.