Am 15.02.20 um 14:13 schrieb Philippe Mouawad:
> On Sat, Feb 15, 2020 at 2:11 PM Felix Schumacher <
> [email protected]> wrote:
>
>> Am 15.02.20 um 13:45 schrieb Philippe Mouawad:
>>> On Sat, Feb 15, 2020 at 1:30 PM Felix Schumacher <
>>> [email protected]> wrote:
>>>
>>>> Am 15.02.20 um 11:26 schrieb Philippe Mouawad:
>>>>> Hello,
>>>>> Working on Bug 64142, and looking into JMeterThread class, I notice
>>>>> something that might not be correct.
>>>>>
>>>>> It seems we fill in total number of thread and group number of thread
>>>> after
>>>>> sampling has occurred:
>>>>>
>>>>>    -
>>>>>
>> https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java#L564
>>>>> Isn't it too late ? Shouldn't we be doing that before this line?
>>>> Where do you want to put it? You mention L564 twice.
>>>>
>>> oups
>>> I meant to store total and group thread  here:
>>>
>> https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java#L555
>>
>>
>> But at that line we don't have the sampler on which we could set the
>> thread name (and of course no sub samplers). The earliest place possible
>> seems to be line 559 right after we got possibly a sampler. But that
>> position is not that far away from line 564, where we do it now and the
>> lines in between are guards against null pointer usage and gathering of
>> information to be filled.
>>
> my idea is to record totalThreadNumber and GroupTotalThreadNumber at this
> line


Ok, just retrieve the information before the sampling and store them later?

In that case, we may be doing stuff, that we would not do now
(result.isIgnore() == true) and maybe we would store different
information (if the sampling changes the values of totalThreadNumber, ...)

I think the latter is exactly why you want to place the gathering
further up, right?

The former is probably not that expensive.

Felix

>
>> Felix
>>
>>
>>>> Felix
>>>>
>>>>>    -
>>>>>
>> https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java#L564
>

Reply via email to