Skip to content

An optionally dockerized on-demand load generating sever

License

Notifications You must be signed in to change notification settings

sha1n/dummy-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Go Report Card License: MIT

Dummy Loader

Dummy loader is a very simple server written in Go that exposes an HTTP API for generating CPU and memory load. It was created for experimentation with resource management configuration in docker/kubernetes environments.

Run The Dockerized Server

To run the server in a docker container, all you have to do is run the following command:

docker run -p 8080:8080 sha1n/dummy-loader

Generating CPU / Memory Load

  1. Start CPU load by running curl -v -XPOST http://<host>:<port>/api/cpu-load?time-sec=30[&cores=2]
    1. time-sec - mandatory, the number of seconds to run the load
    2. cores - optional, how many cores to load
  2. Allocate memory on the server by running curl -v -XPOST http://<host>:<port>/api/mem-footprint?amount-mb=1000
    1. amount-mb - the amount of memory to allocate in MB.

For convenience, these two endpoints support both HTTP GET and POST methods