Giter VIP home page Giter VIP logo

gatling-kafka's Introduction

Gatling-Kafka

An unofficial Gatling 2.1 stress test plugin for Apache Kafka 0.8 protocol.

This plugin supports the Kafka producer API only and doesn't support the Kafka consumer API.

Usage

Cloning this repository

$ git clone https://github.com/mnogu/gatling-kafka.git
$ cd gatling-kafka

Creating a jar file

Install sbt 0.13 if you don't have. And create a jar file:

$ sbt assembly

If you want to change the version of Gatling used to create a jar file, change the following line in build.sbt:

"io.gatling" % "gatling-core" % "2.1.3" % "provided",

and run sbt assembly.

If you don't want to include kafka-clients library to the jar file, change a line on kafka-clients in build.sbt from

("org.apache.kafka" % "kafka-clients" % "0.8.2.0")

to

("org.apache.kafka" % "kafka-clients" % "0.8.2.0" % "provided")

and run sbt assembly.

Note that Apache Kafka 0.8.1.1 or below doesn't contain kafka-clients library.

Putting the jar file to lib directory

Put the jar file to lib directory in Gatling:

$ cp target/scala-2.11/gatling-kafka-assembly-*.jar /path/to/gatling-charts-highcharts-bundle-2.1.*/lib

If you edited build.sbt in order not to include kafka-clients library to the jar file, you also need to copy kafka-clients library to lib directory:

$ cp /path/to/kafka-clients-*.jar /path/to/gatling-charts-highcharts-bundle-2.1.*/lib

Creating a simulation file

$ cd /path/to/gatling-charts-highcharts-bundle-2.1.*
$ vi user-files/simulations/KafkaSimulation.scala

You can find sample simulation files in the test directory. Among these files, BasicSimulation.scala would be a good start point. Make sure that you replace BasicSimulation with KafkaSimulation in BasicSimulation.scala if your simulation filename is KafkaSimulation.scala.

Note that gatling-kafka 0.1.x isn't compatible with 0.0.x. See the README.md in the 0.0.6 release if you are using 0.0.x.

Running a stress test

After starting an Apache Kafka server, run a stress test:

$ bin/gatling.sh

License

Apache License, Version 2.0

gatling-kafka's People

Contributors

mnogu avatar jtjeferreira avatar

Watchers

Morten Kristiansen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.