This is a Gatling third party plugin for thrift protocol.
The documentation is available at https://3tty0n.github.io/gatling-thrift/
Gatling third party plugin for thrift protocol.
Home Page: https://3tty0n.github.io/gatling-thrift/
License: Apache License 2.0
This is a Gatling third party plugin for thrift protocol.
The documentation is available at https://3tty0n.github.io/gatling-thrift/
java.lang.ClassNotFoundException: jdk.internal.misc.Unsafe
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:288)
at io.netty.util.internal.PlatformDependent.getSystemClassLoader(PlatformDependent.java:887)
at io.netty.util.internal.PlatformDependent.isAndroid0(PlatformDependent.java:911)
at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:70)
at io.netty.util.ResourceLeakDetector.<init>(ResourceLeakDetector.java:155)
at io.netty.util.ResourceLeakDetector.<init>(ResourceLeakDetector.java:200)
at io.netty.util.ResourceLeakDetectorFactory$DefaultResourceLeakDetectorFactory.newResourceLeakDetector(ResourceLeakDetectorFactory.java:201)
at io.netty.util.HashedWheelTimer.<clinit>(HashedWheelTimer.java:89)
at com.twitter.finagle.netty4.Netty4HashedWheelTimer.<init>(Netty4HashedWheelTimer.scala:100)
at com.twitter.finagle.netty4.Netty4HashedWheelTimer$.<init>(Netty4HashedWheelTimer.scala:113)
at com.twitter.finagle.netty4.Netty4HashedWheelTimer$.<clinit>(Netty4HashedWheelTimer.scala)
at com.twitter.finagle.Thrift$Client$.<init>(Thrift.scala:215)
at com.twitter.finagle.Thrift$Client$.<clinit>(Thrift.scala)
at com.twitter.finagle.Thrift$.<init>(Thrift.scala:341)
at com.twitter.finagle.Thrift$.<clinit>(Thrift.scala)
at simulation.ThriftSimulationExample.<init>(ThriftSimulationExample.scala:20)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at io.gatling.app.Gatling$.io$gatling$app$Gatling$$$anonfun$1(Gatling.scala:41)
at io.gatling.app.Gatling.run(Gatling.scala:92)
at io.gatling.app.Gatling.runIfNecessary(Gatling.scala:75)
at io.gatling.app.Gatling.start(Gatling.scala:65)
at io.gatling.app.Gatling$.start(Gatling.scala:57)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
at io.gatling.thrift.testrunner.GatlingRunner$class.main(GatlingRunner.scala:19)
at simulation.ThriftSimulationMain$.main(ThriftSimulationExample.scala:15)
at simulation.ThriftSimulationMain.main(ThriftSimulationExample.scala)
class ThriftSimulationExample extends ThriftSimulation {
val client: PingService.FutureIface =
Thrift.client.newIface[PingService.FutureIface]("localhost:9911")
private val isDone = new AtomicBoolean(false)
implicit val callback: Future[String] = {
if (isDone.compareAndSet(false, true)) {
Future.value("first")
} else {
Future.exception(new RuntimeException("already done"))
}
}
val scn: ScenarioBuilder = scenario("Thrift Scenario").repeat(1) {
exec(callback)
}
setUp(scn.inject(constantUsersPerSec(100) during (1 seconds)))
}
will cause OK=100
================================================================================
---- Global Information --------------------------------------------------------
> request count 100 (OK=100 KO=0 )
> min response time 0 (OK=0 KO=- )
> max response time 1 (OK=1 KO=- )
> mean response time 0 (OK=0 KO=- )
> std deviation 0 (OK=0 KO=- )
> response time 50th percentile 0 (OK=0 KO=- )
> response time 75th percentile 0 (OK=0 KO=- )
> response time 95th percentile 0 (OK=0 KO=- )
> response time 99th percentile 0 (OK=0 KO=- )
> mean requests/sec 50 (OK=50 KO=- )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 100 (100%)
> 800 ms < t < 1200 ms 0 ( 0%)
> t > 1200 ms 0 ( 0%)
> failed 0 ( 0%)
================================================================================
thank you for all the effort on this library!
I would like to use the Session
parameter like this:
def deleteImage(session: Session): Future[Boolean] = {
thriftClient.deleteImage(session("i").as[String])
}
...
val deleteImages = scenario("DeleteImages")
.feed(images.shuffle.circular)
.exec(deleteImage)
This is currently not possible because the implicit callback builder looks like this:
implicit def callbackToThriftActionBuilder[A](
callback: => Future[A]
): ThriftActionBuilder[A] = ThriftActionBuilder(callback)
so it does not take a session
parameter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.