You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by iblavins <ib...@temenos.com> on 2007/01/29 17:03:32 UTC
Granularity of Java sampler start end end times
G'day,
I was initially sending SOAP requests via a SOAP sampler. That worked fine
with sampler response times of normal granularity.
Then I changed to sending the SOAP requests through a Java sampler to give
me more flexibility in customising the SOAP statement per sample.
Procedurally this works fine but the sample response times have a
granularity of about 1 second in the associated listener.
A single execution of the test plan executes the Java sampler with 15
different SOAP statements. It is statistically unlikely that they all have a
base response time very close to an integer number of seconds given that
individual response times span are between 2 and 7 seconds.
I did a bit of experimentation and the issue is in the granularity of the
time returned by System.currentTimeMillis() - every call within the Java
sampler returns a time of an integer number of seconds, plus or minus a few
1/1,000's of a second.
I tried using System.nanoTime() instead of System.currentTimeMillis() in the
Java sampler but the result was just the same. I also looked inside the
JMeter code of a sampler and it uses System.currentMillisecs() so its not
like it is doing anything different from my Java sampler.
I don't believe the issue is in any Windows or Java system setting because I
can run my Java sampler and a simple standard JMeter HTTP sampler
consecutively in a test plan and the Java sampler shows a granularity around
1 second and the HTTP sampler shows a much finer granularity.
The results are tabulated below. Add-customer-n is the nth SOAP request. All
the HTTP requests were to the same page so the response times will be
similar.
Anybody have any suggestions ?
1
15:52:10.176
TG1 1-1
Add customer-1
2016
true
3208
2
15:52:12.223
TG1 1-1
HTTP Request
500
true
4509
3
15:52:12.723
TG1 1-1
Add customer-2
2016
true
3208
4
15:52:14.739
TG1 1-1
HTTP Request
343
true
4509
5
15:52:15.082
TG1 1-1
Add customer-3
5031
true
9046
6
15:52:20.129
TG1 1-1
HTTP Request
328
true
4509
7
15:52:20.473
TG1 1-1
Add customer-4
5015
true
9100
8
15:52:25.488
TG1 1-1
HTTP Request
344
true
4509
9
15:52:25.832
TG1 1-1
Add customer-5
4016
true
3224
10
15:52:29.848
TG1 1-1
HTTP Request
343
true
4509
11
15:52:30.191
TG1 1-1
Add customer-6
2016
true
2322
12
15:52:32.207
TG1 1-1
HTTP Request
344
true
4509
13
15:52:32.551
TG1 1-1
Add customer-7
2015
true
2322
14
15:52:34.566
TG1 1-1
HTTP Request
344
true
4509
15
15:52:34.910
TG1 1-1
Add customer-8
5062
true
22764
16
15:52:39.972
TG1 1-1
HTTP Request
360
true
4509
17
15:52:40.332
TG1 1-1
Add customer-9
4015
true
6030
18
15:52:44.347
TG1 1-1
HTTP Request
344
true
4509
19
15:52:44.691
TG1 1-1
Add customer-10
7015
true
6025
20
15:52:51.706
TG1 1-1
HTTP Request
407
true
4509
21
15:52:52.113
TG1 1-1
Add customer-11
5062
true
21044
22
15:52:57.191
TG1 1-1
HTTP Request
328
true
4509
23
15:52:57.519
TG1 1-1
Add customer-12
5015
true
6025
24
15:53:02.534
TG1 1-1
HTTP Request
344
true
4509
25
15:53:02.878
TG1 1-1
Add customer-13
4016
true
6025
26
15:53:06.894
TG1 1-1
HTTP Request
343
true
4509
27
15:53:07.237
TG1 1-1
Add customer-14
5016
true
9113
28
15:53:12.253
TG1 1-1
HTTP Request
344
true
4509
29
15:53:12.597
TG1 1-1
Add customer-15
6046
true
18909
30
15:53:18.659
TG1 1-1
HTTP Request
328
true
4509
Ian Blavins
Contract Performance Engineer
Temenos
This email (and any attachments) contains confidential information, and is intended
only for the named recipient. Distribution or copying of this email by anyone
other than the named recipient is prohibited. If you are not the named or
intended recipient, please notify TEMENOS or the sender immediately and
permanently destroy this email (and any attachments) and all copies of it. No
member of TEMENOS Group AG or any of its associated or affiliated companies is
liable for any errors or omissions in the content or transmission of this
email. Any opinions contained in this email are solely those of the author and,
unless clearly indicated otherwise in writing, are not endorsed by any member
of TEMENOS Group AG or any of its associated and affiliated companies.
RE: Granularity of Java sampler start end end times
Posted by iblavins <ib...@temenos.com>.
G'day
Okay, I got it.
It was a coding issue in the Java sampler.
Ian Blavins
Contract Performance Engineer
Temenos
-----Original Message-----
From: iblavins [mailto:iblavins@temenos.com]
Sent: 29 January 2007 16:04
To: jmeter-user@jakarta.apache.org
Subject: Granularity of Java sampler start end end times
G'day,
I was initially sending SOAP requests via a SOAP sampler. That worked fine
with sampler response times of normal granularity.
Then I changed to sending the SOAP requests through a Java sampler to give
me more flexibility in customising the SOAP statement per sample.
Procedurally this works fine but the sample response times have a
granularity of about 1 second in the associated listener.
A single execution of the test plan executes the Java sampler with 15
different SOAP statements. It is statistically unlikely that they all have a
base response time very close to an integer number of seconds given that
individual response times span are between 2 and 7 seconds.
I did a bit of experimentation and the issue is in the granularity of the
time returned by System.currentTimeMillis() - every call within the Java
sampler returns a time of an integer number of seconds, plus or minus a few
1/1,000's of a second.
I tried using System.nanoTime() instead of System.currentTimeMillis() in the
Java sampler but the result was just the same. I also looked inside the
JMeter code of a sampler and it uses System.currentMillisecs() so its not
like it is doing anything different from my Java sampler.
I don't believe the issue is in any Windows or Java system setting because I
can run my Java sampler and a simple standard JMeter HTTP sampler
consecutively in a test plan and the Java sampler shows a granularity around
1 second and the HTTP sampler shows a much finer granularity.
The results are tabulated below. Add-customer-n is the nth SOAP request. All
the HTTP requests were to the same page so the response times will be
similar.
Anybody have any suggestions ?
1
15:52:10.176
TG1 1-1
Add customer-1
2016
true
3208
2
15:52:12.223
TG1 1-1
HTTP Request
500
true
4509
3
15:52:12.723
TG1 1-1
Add customer-2
2016
true
3208
4
15:52:14.739
TG1 1-1
HTTP Request
343
true
4509
5
15:52:15.082
TG1 1-1
Add customer-3
5031
true
9046
6
15:52:20.129
TG1 1-1
HTTP Request
328
true
4509
7
15:52:20.473
TG1 1-1
Add customer-4
5015
true
9100
8
15:52:25.488
TG1 1-1
HTTP Request
344
true
4509
9
15:52:25.832
TG1 1-1
Add customer-5
4016
true
3224
10
15:52:29.848
TG1 1-1
HTTP Request
343
true
4509
11
15:52:30.191
TG1 1-1
Add customer-6
2016
true
2322
12
15:52:32.207
TG1 1-1
HTTP Request
344
true
4509
13
15:52:32.551
TG1 1-1
Add customer-7
2015
true
2322
14
15:52:34.566
TG1 1-1
HTTP Request
344
true
4509
15
15:52:34.910
TG1 1-1
Add customer-8
5062
true
22764
16
15:52:39.972
TG1 1-1
HTTP Request
360
true
4509
17
15:52:40.332
TG1 1-1
Add customer-9
4015
true
6030
18
15:52:44.347
TG1 1-1
HTTP Request
344
true
4509
19
15:52:44.691
TG1 1-1
Add customer-10
7015
true
6025
20
15:52:51.706
TG1 1-1
HTTP Request
407
true
4509
21
15:52:52.113
TG1 1-1
Add customer-11
5062
true
21044
22
15:52:57.191
TG1 1-1
HTTP Request
328
true
4509
23
15:52:57.519
TG1 1-1
Add customer-12
5015
true
6025
24
15:53:02.534
TG1 1-1
HTTP Request
344
true
4509
25
15:53:02.878
TG1 1-1
Add customer-13
4016
true
6025
26
15:53:06.894
TG1 1-1
HTTP Request
343
true
4509
27
15:53:07.237
TG1 1-1
Add customer-14
5016
true
9113
28
15:53:12.253
TG1 1-1
HTTP Request
344
true
4509
29
15:53:12.597
TG1 1-1
Add customer-15
6046
true
18909
30
15:53:18.659
TG1 1-1
HTTP Request
328
true
4509
Ian Blavins
Contract Performance Engineer
Temenos
This email (and any attachments) contains confidential information, and is
intended
only for the named recipient. Distribution or copying of this email by
anyone
other than the named recipient is prohibited. If you are not the named or
intended recipient, please notify TEMENOS or the sender immediately and
permanently destroy this email (and any attachments) and all copies of it.
No
member of TEMENOS Group AG or any of its associated or affiliated companies
is
liable for any errors or omissions in the content or transmission of this
email. Any opinions contained in this email are solely those of the author
and,
unless clearly indicated otherwise in writing, are not endorsed by any
member
of TEMENOS Group AG or any of its associated and affiliated companies.
This email (and any attachments) contains confidential information, and is intended
only for the named recipient. Distribution or copying of this email by anyone
other than the named recipient is prohibited. If you are not the named or
intended recipient, please notify TEMENOS or the sender immediately and
permanently destroy this email (and any attachments) and all copies of it. No
member of TEMENOS Group AG or any of its associated or affiliated companies is
liable for any errors or omissions in the content or transmission of this
email. Any opinions contained in this email are solely those of the author and,
unless clearly indicated otherwise in writing, are not endorsed by any member
of TEMENOS Group AG or any of its associated and affiliated companies.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org