Description
stress
to invoke many times a method of a set of services.invoke
to invoke a method of a set of services.stress
command stops invocations on the service when this service is unregistered
Contributors
License
Library GNU Public License
Services
Properties
Requirements
Download
Build
Settings
None
Usage
stress [-csv] <numberOfLoop> <serviceFilter> <methodName> <argv0> ...
invoke <serviceFilter> <methodName> <argv0> ...
Run the demo
To run the demo of this bundle, enter the following commands in the OSCAR shell
-> cd http://www-adele.imag.fr/~donsez/dev/osgi/ -> start helloservice11/helloservice11.jar -> start helloservice10/helloservice10.jar -> services -> start stresscmd/stresscmd.jar -> stress 1000000 (objectClass=fr.imag.adele.bundle.hello.HelloService) sayHello Didier -> stress -csv 1000000 (objectClass=fr.imag.adele.bundle.hello.HelloService) sayHello Didier -> stress 1000000 (objectClass=fr.imag.adele.bundle.hello.LocaleService) getLanguage -> stress 1000000 (objectClass=fr.imag.adele.bundle.hello.LocaleService) setLanguage -> stress 1000000 (objectClass=fr.imag.adele.bundle.hello.LocaleService) setLanguage fr ... -> invoke (objectClass=fr.imag.adele.bundle.hello.LocaleService) getLanguage -> invoke (objectClass=fr.imag.adele.bundle.hello.LocaleService) setLanguage frThe output is:
-> services 27 Hello Service Impl 1.1 (27) provides: ------------------------------------- description = a simple example of OSGi service language = fr objectClass = fr.imag.adele.bundle.hello.HelloService, fr.imag.adele.bundle.hello.LocaleService service.id = 44 -> services 29 Hello Service Impl 1.0 (29) provides: ------------------------------------- description = a simple example of OSGi service language = fr objectClass = fr.imag.adele.bundle.hello.HelloService service.id = 46 -> stress 1000000 (objectClass=fr.imag.adele.bundle.hello.HelloService) sayHello Didier invoke public java.lang.String fr.imag.adele.bundle.hello.impl.HelloServiceImpl.sayHello(java.lang.String) of service.id=44 ... Minimum time per call (ms): 0 Total time for 1000000 calls (ms): 2634 invoke public java.lang.String fr.imag.adele.bundle.hello.impl.HelloServiceImpl.sayHello(java.lang.String) of service.id=46 ... Minimum time per call (ms): 0 Total time for 1000000 calls (ms): 2351 -> -> stress -csv 1000000 (objectClass=fr.imag.adele.bundle.hello.HelloService) sayHello Didier service.id;nethod;time.per.loop;numberloop;total.time 44;public java.lang.String fr.imag.adele.bundle.hello.impl.HelloServiceImpl.sayHello(java.lang.String);0;1000000;2593 46;public java.lang.String fr.imag.adele.bundle.hello.impl.HelloServiceImpl.sayHello(java.lang.String);0;1000000;2484 -> -> stress 1000000 (objectClass=fr.imag.adele.bundle.hello.LocaleService) getLanguage invoke public java.lang.String fr.imag.adele.bundle.hello.impl.HelloServiceImpl.getLanguage() of service.id=44 ... Minimum time per call (ms): 0 Total time for 1000000 calls (ms): 420 -> -> stress 1000000 (objectClass=fr.imag.adele.bundle.hello.LocaleService) setLanguage The service does not implement this method -> -> stress 1000000 (objectClass=fr.imag.adele.bundle.hello.LocaleService) setLanguage fr invoke public void fr.imag.adele.bundle.hello.impl.HelloServiceImpl.setLanguage(java.lang.String) of service.id=44 ... Minimum time per call (ms): 0 Total time for 1000000 calls (ms): 441 -> -> stress 100000000 (objectClass=fr.imag.adele.bundle.hello.LocaleService) getLanguage invoke public java.lang.String fr.imag.adele.bundle.hello.impl.HelloServiceImpl. getLanguage() of service.id=44 ... (stop 29 in the Shell GUI) Minimum time per call (ms): 0 Total time for 12941914 calls (ms): 6099(4.712595E-4 ms/call) -> (remark: the stress completes before 100000000 loops since the bundle 29 have unregistered the service 44)
Typical Usages
stress
: for benchmarking services on the gatewayinvoke
: for configuring services through setters/getters (JavaBean,MBean,...)
Tested gateways
Versions history
TODO (contributions are welcome)
Links