Open swaranga-netflix opened 1 year ago
Can you explain how you are running via commandline?
Running it via the uber jar:
java -jar jetty-load-generator-starter-3.1.4-uber.jar \
--host host --port port \
--stats-file /tmp/stats.log \
--display-stats true \
--resource-json-path resource.json \
-rt 1 -rtu m -t 25 -rr 100
uhm. actually I guess you get something such
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
because the uber jar doesn't include any slf4j impl whereas we use slf4j as logging api and so to display the histogram...
As a workaround you can download manually slf4-simple from here https://repo.maven.apache.org/maven2/org/slf4j/slf4j-simple/2.0.6/slf4j-simple-2.0.6.jar
And start the uber jar as is (note you cannot use the option -jar
as it is not possible to use more than one jar with this option) :
java -cp slf4j-simple-2.0.6.jar:jetty-load-generator-starter-3.1.4-uber.jar org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter \
--host host --port port \
--stats-file /tmp/stats.log \
--display-stats true \
--resource-json-path resource.json \
-rt 1 -rtu m -t 25 -rr 100
The output should be something such:
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - load generator config: Config[t=2,i=-1,u=1,c=128,r=2,rf=10s,https://host:port]
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - load generation begin
[main] WARN org.eclipse.jetty.util.ssl.SslContextFactory.config - Trusting all certificates configured for Client@44a3ec6b[provider=null,keyStore=null,trustStore=null]
[main] WARN org.eclipse.jetty.util.ssl.SslContextFactory.config - No Client EndPointIdentificationAlgorithm configured for Client@44a3ec6b[provider=null,keyStore=null,trustStore=null]
[LoadGenerator@15bfd87-sender-1] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - load generation complete
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter -
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - ----------------------------------------------------
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - ------------- Load Generator Report --------------
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - ----------------------------------------------------
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - https://host:443 over http/1.1
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - resource tree : 1 resource(s)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - begin date time : 2023-03-17 16:15:47 AEST
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - complete date time: 2023-03-17 16:16:00 AEST
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - recording time : 11.311 s
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - average cpu load : 20.678/1600
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter -
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - histogram:
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 143 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 286 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 429 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 572 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 716 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 859 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 1,002 ms (2, 11.11%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 1,145 ms (7, 38.89%) ^50%
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 1,289 ms (2, 11.11%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 1,432 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 1,575 ms (1, 5.56%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 1,718 ms (1, 5.56%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 1,862 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 2,005 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 2,148 ms (1, 5.56%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 2,291 ms (1, 5.56%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 2,435 ms (1, 5.56%) ^85%
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 2,578 ms (0, 0.00%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 2,721 ms (1, 5.56%)
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - @ _ 2,864 ms (1, 5.56%) ^95% ^99% ^99.9%
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - response times: 18 samples | min/avg/50th%/99th%/max = 924/1,511/1,145/2,864/2,864 ms
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter -
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - nominal resource rate (resources/s): 2.000
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - nominal request rate (requests/s) : 2.000
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - request rate (requests/s) : 1.999
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - response rate (responses/s) : 1.591
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - send rate (bytes/s) : 2716.275
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - receive rate (bytes/s) : 379568.426
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - failures : 0
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - response 1xx group: 0
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - response 2xx group: 18
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - response 3xx group: 0
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - response 4xx group: 0
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - response 5xx group: 0
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - ----------------------------------------------------
[main] INFO org.mortbay.jetty.load.generator.starter.LoadGeneratorStarter - load generator report saved to: /tmp/stats.log
you can probably customise the output by providing a file simplelogger.properties
via -cp
option see documentation here https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html
@sbordet I guess we should add one slf4j impl in the uber jar to make easy to use. WDYT? Which one?
I guess we should add one slf4j impl in the uber jar to make easy to use.
I'm not sure... If we add one, then those that want to use a different one would not be able to, right?
I guess we should add one slf4j impl in the uber jar to make easy to use.
I'm not sure... If we add one, then those that want to use a different one would not be able to, right?
Oh yes definitely that will be the problem.. 😀 I will at least change the README to explain how to have logging
@swaranga-netflix btw did my comment answer your question?
I will let you take the final call, but as a recent user, I expected the Uber jar to be batteries included and that included the logging stuff. I would not want to have an additional logger jar be a requirement. I think you can offer a system property that points to a logging properties file if I want to customize the format but otherwise taking a stance on the logging implementation and a default format seems pretty reasonable to me.
@olamy - yes it did. Thank you.
Running a load test from the commandline generates a report like:
How do I visualize the
histogram
data?