Machmeter

Machmeter is a tool to bootstrap POCs on Cloud Spanner quickly and easily.

Learn More View it on GitHub


Machmeter is an open source tool for performance benchmarking of Cloud Spanner. This repository contains Machmeter code, usage instructions and a few example use-cases. Users can clone any of these use-case and edit them to imitate their specific use-case.

What does Machmeter do?

  • Simplifying setup for performance test: This tool provides an easy-to-use CLI which can set up an integrated environment to test on Spanner quickly with pre-built sample test scenarios. It simplifies operations such as setting up a Spanner instance, setting up client metrics collection, setting up a Kubernetes cluster and running an at-scale JMeter template using leader-follower configuration.
  • Randomized data generation for complex schema(s): Machmeter provides samples for common use-cases to configure JMeter to generate randomized data for a given schema. These templates use JMeter APIs and are GUI driven.
  • Base templates for new use cases: Templates can easily be extended/modified to adapt to a customer’s specific use case. Moreover, you can also quickly implement custom scenarios within this tool with little java code/editing existing scenarios.

Project Structure

  • Machmeter: this is a maven project containing the code for the tools. It has broadly 2 modules, an Orchestrator layer and Plugins.
    • Orchestrator Layer: this layer handles the input and reads the provided config. Further, based on the input, it decides which plugins need to be executed.
    • Plugins: this layer contains plugins for various stages of the benchmarking.
      • MachmeterStatePlugin: This plugin sets up the local directories for preserving Machmeter state.
      • InfraSetupPlugin: This plugin executes terraform scripts to setup the Spanner Instances and GKE cluster for Jmeter clients.
      • DdlPlugin: This plugin is for loading data into the Spanner Instances.
      • ExecutePlugin: This plugin executes the benchmarking tests provided in the use-case.
    • Terraform: This folder contains a terraform script for setting up Spanner Instances and GKE clusters. It also contains config files for the Grafana Dashboard.
  • Use-cases: all the sample use-cases reside into this folder categorized into different folders.

About the project

Contributing

CONTRIBUTING docs

License

This is Apache 2.0 License

This is not an officially supported Google product.