Skip to content

Latest commit

 

History

History
85 lines (61 loc) · 3.89 KB

README.md

File metadata and controls

85 lines (61 loc) · 3.89 KB

Azure Cosmos DB Sampler

The Azure Cosmos DB Sampler Plugin allows you to make queries to your Azure Cosmos DB instance from Apache JMeter. After executing your queries, you will get back the Cosmos DB metrics in your response body that you can view from the View Results Tree lisenter. Furthermore, if you want to view the metrics in application insights, you can send these to your Azure Monitor instance with the AppInsights Backend Listener plugin. More details below about how to get that piece up and running.

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

  1. JDK version >= 11.

  2. Some knowledge of Apache JMeter.

  3. Install Apache JMeter here. If you are on a mac, you can use install it via brew: brew install jmeter.

  4. Install the plugin manager. If you used brew to install, the path will be located in $(brew --prefix)/Cellar/jmeter/5.4.3/libexec/lib/ext

  5. Add our Cosmos DB Sampler to your external plugins folder.

    • For OSX, you can run
      cd /Your/path/AzureCosmosDBSampler
      mvn package
      to build and package the JAR files. You'll want to copy the jar azure-cosmos-db-sampler-1.0-SNAPSHOT-jar-with-dependencies.jar to the same place you copied the plugin manager on step 4.
  6. READ FURTHER ONLY IF YOU WANT TO USE THE TEMP FORK OF THE AppInsights Plugin TO VIEW METRICS IN APPINSIGHTS:

    • Pull down this repo.
    • Run the maven package command.
    • Put the Jar file in your external Apache JMeter Plugins folder.
    • Add a Backend Listener to your thread group.
    • Select the AzureBackendClient backend listener in the drop down.
    • Enter your connection string and all other applicable values to the configuration.

Running your first test

  1. Create a thread group.
  2. Add the Azure Cosmos DB Sampler to the thread group.
  3. Enter your query and configuration values.
  4. Add a View Result Tree listener so you can see your response and status.
  5. Press the green play button on the tool bar and view results in the View Result Tree.

Quickstart

  1. Import the .jmx file in the example folder into Apache JMeter.
  2. Enter your query and configuration values insight the sampler and backend listener. You can disable or remove the backend listener if you don't want to send metrics to Application Insights.
  3. Hit the play button and view results in the View Result Tree.

Contributing

Please read our CONTRIBUTING.md which outlines all of our policies, procedures, and requirements for contributing to this project.

Versioning and changelog

We use SemVer for versioning. For the versions available, see the tags on this repository.

It is a good practice to keep CHANGELOG.md file in repository that can be updated as part of a pull request.

License

This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.

Trademark Notice

Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.