Skip to content

ntk148v/goload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoLoad

Generate load for testing.

GitHub license GitHub stars


Inspired by golang-memtest & go-cpu-load.

Install

go get -u github.com/ntk148v/goload

Usage

  • Basic:
# Allocate 1024MB memory in 20MB block
./goload mem -total 1024 -block 20
# Run 100% of all CPU cores for 10 seconds
./goload cpu -time 10
# Run 100% of 2 CPU cores for 10 seconds
./goload cpu -cores 2 -time 10
  • Docker:
# Build image
$ docker build -t kiennt26/goload .
# Or simple pull from Hub docker
$ docker pull kiennt26/goload
$ docker run -it --rm -m 8m kiennt26/goload mem -total 10 -block 2
Alloc = 2 MB    TotalAlloc = 2 MiB      Sys = 8 MB      NumGC = 0
Alloc = 4 MB    TotalAlloc = 4 MiB      Sys = 12 MB     NumGC = 1
Alloc = 6 MB    TotalAlloc = 6 MiB      Sys = 16 MB     NumGC = 1
# OOM -> Get killed at 8MB

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published