Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akramarenkov/stat
Library that allows you to collect and display the quantity of occurrences of values in given spans
https://github.com/akramarenkov/stat
go golang statistics
Last synced: 5 days ago
JSON representation
Library that allows you to collect and display the quantity of occurrences of values in given spans
- Host: GitHub
- URL: https://github.com/akramarenkov/stat
- Owner: akramarenkov
- License: mit
- Created: 2024-11-02T02:50:38.000Z (5 days ago)
- Default Branch: master
- Last Pushed: 2024-11-02T03:00:15.000Z (5 days ago)
- Last Synced: 2024-11-02T03:24:42.380Z (5 days ago)
- Topics: go, golang, statistics
- Language: Go
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Stat
[![Go Reference](https://pkg.go.dev/badge/github.com/akramarenkov/stat.svg)](https://pkg.go.dev/github.com/akramarenkov/stat)
[![Go Report Card](https://goreportcard.com/badge/github.com/akramarenkov/stat)](https://goreportcard.com/report/github.com/akramarenkov/stat)
[![Coverage Status](https://coveralls.io/repos/github/akramarenkov/stat/badge.svg)](https://coveralls.io/github/akramarenkov/stat)## Purpose
Library that allows you to collect and display the quantity of occurrences of values in given spans
## Usage
Example:
```go
package mainimport (
"fmt"
"os""github.com/akramarenkov/stat"
)func main() {
linear, err := stat.NewLinear(1, 100, 20)
if err != nil {
panic(err)
}linear.Add(0)
linear.Add(1)
linear.Add(20)linear.Add(21)
linear.Add(22)
linear.Add(40)linear.Add(41)
linear.Add(42)
linear.Add(59)
linear.Add(60)linear.Add(61)
linear.Add(62)
linear.Add(80)linear.Add(81)
linear.Add(100)linear.Add(101)
fmt.Println(linear.Stat().Graph(os.Stderr))
// Output:
//
}
```