Library that allows you to imposes a load on the system and the runtime in order to provide the main code with as little processor time as possible
This is a very simple implementation that does not adapt to performance and the features of the system and runtime
Example:
package main
import (
"time"
"github.com/akramarenkov/stressor"
)
func main() {
opts := stressor.Opts{
AllocFactor: 1,
AllocSize: 1,
LockFactor: 1,
ScheduleFactor: 1,
ScheduleSleep: time.Nanosecond,
}
stressor := stressor.New(opts)
defer stressor.Stop()
// Main code
time.Sleep(time.Second)
// Output:
}