Azure-Samples / Iot-Telemetry-Simulator

The IoT Telemetry Simulator allows you to test Azure IoT Hub or Eventhub ingestion at scale. The implementation is communicating with Azure IoT Hub using multiplexed AMQP connections. An automation library allows you to run it as load test as part of a CI/CD pipeline.
MIT License
68 stars 48 forks source link

Do a rough benchmark of the different templating methods #13

Closed gukoff closed 3 years ago

gukoff commented 3 years ago

Experimenting with the new templating engine to fix https://github.com/Azure-Samples/Iot-Telemetry-Simulator/issues/12

I tried 3 approaches to generate a message from the template and the variables dictionary.

Results on the different data inputs:

10 vars 100 vars 1000 vars
Replace loop 0.08ms 2ms 349ms
Regex 11ms 33ms 589ms
Composite formatting 0.3ms 1ms 2ms
TechPreacher commented 3 years ago

Perfect, thanks for helping improve the repo!