https://github.com/crowdstrike/go-metrics-sliding-window
A sliding window sampling implementation for the rcrowley/go-metrics library.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.8%) to scientific vocabulary
Keywords from Contributors
Repository
A sliding window sampling implementation for the rcrowley/go-metrics library.
Basic Info
Statistics
- Stars: 24
- Watchers: 3
- Forks: 2
- Open Issues: 0
- Releases: 0
Metadata Files
README.md

Sliding Window Sampling for go-metrics
Overview
This project contains a simple implementation of a sliding window sampling approach implementing the rcrowley/go-metrics Sample interface. The user can define a reservoir size, much like the default sampling approach, but also define a window size that is used to phase out sample values once they fall outside the window.
Rationale
The problem with the default exponential decay sampling approach is that it only expires old data as new data comes in. While this approach works perfectly fine for high-volume metrics, it is problematic for low-volume metrics and can lead to misleading graphs where the data is stale, but looks like it is recent. This issue is particularly troublesome when measuring metrics with a histogram (e.g., endpoint latency).
Ideally this contribution would be made to the go-metrics project itself, but the author has made it clear he would rather have others implement this themselves and leverage the exported interfaces.
Examples
```go package main
import ( "time"
"github.com/crowdstrike/go-metrics-sliding-window"
"github.com/rcrowley/go-metrics"
)
func main() { // Creates a histogram using the sliding window sampling approach with a reservoir size of 1024 and a sampling window of 2 minutes. sample := slidingwindow.NewSample(1024, time.Minute*2) histogram := metrics.GetOrRegisterHistogram("histogram.latency", metrics.DefaultRegistry, sample) histogram.Update(1)
// Uses the histogram with the sliding window sampling to create a timer.
timer := metrics.NewCustomTimer(histogram, metrics.NewMeter())
timer.Time(myFunc())
} ```
Owner
- Name: CrowdStrike
- Login: CrowdStrike
- Kind: organization
- Email: github@crowdstrike.com
- Location: United States of America
- Website: https://www.crowdstrike.com
- Repositories: 183
- Profile: https://github.com/CrowdStrike
GitHub Events
Total
- Delete event: 7
- Push event: 8
- Pull request review event: 5
- Pull request event: 12
- Create event: 4
Last Year
- Delete event: 7
- Push event: 8
- Pull request review event: 5
- Pull request event: 12
- Create event: 4
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Chris Cannon | c****n@c****m | 20 |
| dependabot[bot] | 4****] | 7 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 1
- Total pull requests: 17
- Average time to close issues: 3 days
- Average time to close pull requests: 4 months
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.06
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 11
Past Year
- Issues: 0
- Pull requests: 9
- Average time to close issues: N/A
- Average time to close pull requests: about 10 hours
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 6
Top Authors
Issue Authors
- szuecs (1)
Pull Request Authors
- dependabot[bot] (11)
- chriscannon (6)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
- Total downloads: unknown
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 6
proxy.golang.org: github.com/Crowdstrike/go-metrics-sliding-window
- Documentation: https://pkg.go.dev/github.com/Crowdstrike/go-metrics-sliding-window#section-documentation
- License: mit
-
Latest release: v0.2.0
published almost 4 years ago
Rankings
proxy.golang.org: github.com/crowdstrike/go-metrics-sliding-window
- Homepage: https://github.com/crowdstrike/go-metrics-sliding-window
- Documentation: https://pkg.go.dev/github.com/crowdstrike/go-metrics-sliding-window#section-documentation
- License: MIT
-
Latest release: v0.2.0
published almost 4 years ago
Rankings
proxy.golang.org: github.com/CrowdStrike/go-metrics-sliding-window
- Documentation: https://pkg.go.dev/github.com/CrowdStrike/go-metrics-sliding-window#section-documentation
- License: mit
-
Latest release: v0.2.0
published almost 4 years ago
Rankings
Dependencies
- github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
- github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
- actions/checkout v3 composite
- actions/setup-go v3 composite
- golangci/golangci-lint-action v3 composite
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- actions/checkout v3 composite
- securego/gosec master composite