All checks were successful
DCO action / DCO (pull_request) Successful in 29s
Vulncheck / Vulncheck (pull_request) Successful in 41s
Tests and linters / Tests (pull_request) Successful in 1m16s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m28s
Tests and linters / gopls check (pull_request) Successful in 1m23s
Tests and linters / Tests with -race (pull_request) Successful in 1m26s
Tests and linters / Run gofumpt (pull_request) Successful in 1m25s
Tests and linters / Lint (pull_request) Successful in 1m31s
Tests and linters / Staticcheck (pull_request) Successful in 1m30s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
20 lines
303 B
Go
20 lines
303 B
Go
package scheduling
|
|
|
|
import "sync/atomic"
|
|
|
|
type Stat struct {
|
|
tag string
|
|
inProgress, pending atomic.Uint64
|
|
}
|
|
|
|
func (s *Stat) Tag() string {
|
|
return s.tag
|
|
}
|
|
|
|
func (s *Stat) InProgress() uint64 {
|
|
return s.inProgress.Load()
|
|
}
|
|
|
|
func (s *Stat) Pending() uint64 {
|
|
return s.pending.Load()
|
|
}
|