Giter Club home page Giter Club logo

thingson.mqtt.bench's Introduction

ThingsOn MQTT Bench

ThingsOn MQTT Bench is a simple Cross-platform .NET Core benchmark tool for MQTT brokers. It measures the maximum number of messages that can be sent to the broker in a specified amount of time.

ThingsOnMQTTBenchmin.gif

Features

  • Measures the maximum number of messages that can be sent to an MQTT broker in a specified amount of time.
  • Supports MQTT brokers running MQTT protocol versions 3.1.1 (MQTTv3.1.1) and 5.0 (MQTTv5.0).
  • Allows customization of the following benchmark settings:
    • Number of MQTT clients to use for benchmarking
    • Number of messages to send per client
    • Message size in bytes
    • Quality of Service (QoS) level for messages (0, 1, or 2)
    • Whether messages should be retained by the broker
  • Outputs progress information to the console during benchmarking.
  • Outputs the following information upon benchmark completion:
    • Number of messages sent
    • Total time taken to send messages
    • Message throughput (messages per second)
    • Time taken to connect to the MQTT broker
    • Time taken to disconnect from the MQTT broker
    • Success rate (percentage of messages that were successfully sent)
    • Loss rate (percentage of messages that were not successfully sent)

Usage

To use ThingsOn MQTT Bench, first make sure that you have .NET 7 installed on your system. Then, download the latest release of ThingsOn MQTT Bench for your operating system from the releases page.

Once you have downloaded the tool, you can run it from the command line by navigating to the directory where the tool is located and running the following command:

dotnet ThingsOn.MQTT.Bench.dll

By default, the tool will read its settings from a TOML file named config.toml in the same directory as the tool. You can customize the settings by editing this file.

Settings

The following settings are available in the config.toml file:

  • Mqtt: MQTT broker settings
    • ServerUri: URI of the MQTT broker
    • Port: Port number of the MQTT broker
    • MqttVersion: MQTT protocol version (either "V311" or "V500")
    • Username: Username for connecting to the MQTT broker
    • Password: Password for connecting to the MQTT broker
    • KeepAlivePeriod: Keep-alive period in seconds
    • CleanSession: Whether to use a clean session when connecting to the MQTT broker
  • Benchmark: Benchmark settings
    • ClientCount: Number of MQTT clients to use for benchmarking
    • MessageCount: Number of messages to send per client
    • MessageSize: Size of messages in bytes
    • Qos: Quality of service level for messages (0, 1, or 2)
    • Retain: Whether messages should be retained by the broker

Building from Code

To build ThingsOn MQTT Bench from code, follow these steps:

  1. Install .NET 7.
  2. Clone the GitHub repository:
git clone https://github.com/volkanalkilic/ThingsOn.MQTT.Bench.git
  1. Navigate to the cloned repository directory:
  2. Build the project using the following command:
dotnet build
  1. Once the project has built successfully, you can run the benchmark using the following command:
dotnet run --project ThingsOn.MQTT.Bench

Contributing

Contributions to ThingsOn MQTT Bench are welcome! If you find a bug or would like to suggest a new feature, please open an issue on the GitHub repository.

If you would like to contribute code to ThingsOn MQTT Bench, please fork the repository and submit a pull request.

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

thingson.mqtt.bench's People

Contributors

volkanalkilic 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.