Skip to content

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

License

Notifications You must be signed in to change notification settings

akramarenkov/stressor

Repository files navigation

Stressor

Go Reference Go Report Card codecov

Purpose

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

Usage

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:
}

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages