https://github.com/akramarenkov/stressor
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
https://github.com/akramarenkov/stressor
go golang stress
Last synced: 7 months ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/akramarenkov/stressor
- Owner: akramarenkov
- License: mit
- Created: 2024-06-21T02:01:59.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-26T12:28:46.000Z (over 1 year ago)
- Last Synced: 2024-06-26T15:29:26.999Z (over 1 year ago)
- Topics: go, golang, stress
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Stressor
[](https://pkg.go.dev/github.com/akramarenkov/stressor)
[](https://goreportcard.com/report/github.com/akramarenkov/stressor)
[](https://coveralls.io/github/akramarenkov/stressor)## Purpose
Library that provides to imposes a load on the system and the runtime in order
to provide the main code with as little processor time as possibleThis is a very simple implementation that does not adapt to performance and
the features of the system and runtime## Usage
Example:
```go
package mainimport (
"time""github.com/akramarenkov/stressor"
)func main() {
opts := stressor.Opts{
Allocators: 1,
AllocationSize: 2,
Lockers: 1,
Scheduled: 1,
SleepDuration: 10 * time.Nanosecond,
}strain := stressor.New(opts)
defer strain.Stop()// Main code
time.Sleep(time.Second)
// Output:
}
```