hivefleet

package module
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

README

hivefleet Go Report Card

hivefleet is a distributed, scalable load-testing tool, built on top of https://github.com/codesenberg/bombardier (v1.2.5).

It leverages the power of Google Cloud Functions to scale bombardier to any possible range. Google and budget are your only limits.

Take it for a spin

git clone https://github.com/clglavan/hivefleet.git

Prerequisites:

  • a billing enabled GCP project
  • a service account for it, with exported credentials
  • installed and configured gcloud where you run hivefleet
  • asume that any run of this program could result in costs in GCP

setup your config.yml file and pass it as a command line parameter

clients: 5     => number of CF you want to start
local: 0       => used for debugging, leave 0 when load-testing
debug: 0       => a slightly more verbose setting for local
deploy_function: 1      => leave to yes at least the first time
function_memory: 256    => function memory
function_timeout: 120   => function timeout
function_region: "us-central1"       => CF region
credentials: "{path-to-my-credentials}.json" => Path to your google credentials
concurrency: 1  => how many conccurent threads each CF uses 
number: 10      => the number of requests each CF sends
url: https://google.com => url to test

Before you proceed, please check Google's pricing for Cloud Functions: https://cloud.google.com/functions/pricing#cloud-functions-pricing

Run the hive-mind with one of the two binaries

./hive-mind-darwin-amd64 config.yml
- or -
./hive-mind-linux-amd64 config.yml

In the folder you will see a generated report.html

Local setup

If you want to test it out without involing GCP at all, you can first start a local webserver in

./commander/local/local

and from the config values above, change:

local: 1

This will instruct hivefleet to call a local endpoint insted of the cloud function endpoint, and run everything on your local machine

Run the hive-mind with one of the two binaries

./hive-mind-darwin-amd64 config.yml
- or -
./hive-mind-linux-amd64 config.yml

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(confPath string)

Types

type Report

type Report struct {
	Spec struct {
		NumberOfConnections int    `json:"numberOfConnections"`
		TestType            string `json:"testType"`
		NumberOfRequests    int    `json:"numberOfRequests"`
		Method              string `json:"method"`
		URL                 string `json:"url"`
		Body                string `json:"body"`
		Stream              bool   `json:"stream"`
		TimeoutSeconds      int    `json:"timeoutSeconds"`
		Client              string `json:"client"`
	} `json:"spec"`
	Result Result `json:"result"`
}

type Result

type Result struct {
	BytesRead        int     `json:"bytesRead"`
	BytesWritten     int     `json:"bytesWritten"`
	TimeTakenSeconds float64 `json:"timeTakenSeconds"`
	Req1Xx           int     `json:"req1xx"`
	Req2Xx           int     `json:"req2xx"`
	Req3Xx           int     `json:"req3xx"`
	Req4Xx           int     `json:"req4xx"`
	Req5Xx           int     `json:"req5xx"`
	Others           int     `json:"others"`
	Latency          struct {
		Mean   float64 `json:"mean"`
		Stddev float64 `json:"stddev"`
		Max    float64 `json:"max"`
	} `json:"latency"`
	Rps struct {
		Mean        float64 `json:"mean"`
		Stddev      float64 `json:"stddev"`
		Max         float64 `json:"max"`
		Percentiles struct {
			Num50 float64 `json:"50"`
			Num75 float64 `json:"75"`
			Num90 float64 `json:"90"`
			Num95 float64 `json:"95"`
			Num99 float64 `json:"99"`
		} `json:"percentiles"`
	} `json:"rps"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL