jakarta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lin <wool...@gmail.com>
Subject Re: [JMeter] JUnit sampler sample time changes
Date Sun, 03 Apr 2011 12:50:41 GMT
Another important thing to consider is that nano time costs a lot more
than System.currentTimeMillis().

I've done some benchmarking in the past and nano time costs 30% on
windows. On linux, the cost is higher due to differences in how it's
implemented.

On Sun, Apr 3, 2011 at 5:28 AM, sebb <sebbaz@gmail.com> wrote:
> On 3 April 2011 08:32, Ben Cuthbert <ben_cuthbert@yahoo.co.uk> wrote:
>> I see the nanotime. But the time in the sampler results is reported in ms. So when
you have you data
>> it just says 0. I would like it to go one further and report a low level.
>
> Sorry, that's not possible currently.
>
> Changing the elapsed time to nanoSecs would break compatibility, and
> such a level of precision is illusory anyway for almost all of the
> samplers.
>
> It might be possible to keep a separate field for nanoSeconds and
> report that, but I'm not sure there's sufficient need to warrant the
> change and additional data storage.
>
>> Regards
>> On 2 Apr 2011, at 16:18, sebb wrote:
>>
>>> On 31 March 2011 19:41, Ben Cuthbert <ben_cuthbert@yahoo.co.uk> wrote:
>>>> All
>>>>
>>>> I have been looking over the code in the JUnitSampler code under the jmeter
source.
>>>> I would like to make a change to use nanoTime() rather than milliseconds.
>>>
>>> Why?
>>>
>>>> I can see in the AnnotatedTestCase there is an elapsed time. But I can't
see how it
>>>> is returned to a results table. Any ideas?
>>>
>>> The time in AnnotatedTestCase is only used for reporting timeout errors.
>>>
>>> The actual sample time is calculated using SampleResult.sampleStart()
>>> and sampleEnd() which already use nanoTime().
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: dev-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: dev-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: dev-help@jakarta.apache.org


Mime
View raw message