https://github.com/crowdstrike/go-metrics-sliding-window

A sliding window sampling implementation for the rcrowley/go-metrics library.

https://github.com/crowdstrike/go-metrics-sliding-window

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

archival projection profiles interactive sequences generic observability autograding hacking shellcodes
Last synced: 9 months ago · JSON representation

Repository

A sliding window sampling implementation for the rcrowley/go-metrics library.

Basic Info
  • Host: GitHub
  • Owner: CrowdStrike
  • License: mit
  • Language: Go
  • Default Branch: main
  • Homepage:
  • Size: 79.1 KB
Statistics
  • Stars: 24
  • Watchers: 3
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Created almost 4 years ago · Last pushed 9 months ago
Metadata Files
Readme License Code of conduct Codeowners Security

README.md

CrowdStrike Go Metrics Sliding Window

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

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

All Time
  • Total Commits: 27
  • Total Committers: 2
  • Avg Commits per committer: 13.5
  • Development Distribution Score (DDS): 0.259
Past Year
  • Commits: 6
  • Committers: 2
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email 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
dependencies (11) github_actions (11)

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
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.6%
Average: 6.8%
Dependent repos count: 7.0%
Last synced: 9 months ago
proxy.golang.org: github.com/crowdstrike/go-metrics-sliding-window
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 4.2%
Dependent packages count: 7.0%
Average: 7.4%
Forks count: 9.0%
Dependent repos count: 9.3%
Last synced: 9 months ago
proxy.golang.org: github.com/CrowdStrike/go-metrics-sliding-window
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 4.2%
Dependent packages count: 7.0%
Average: 7.4%
Forks count: 9.0%
Dependent repos count: 9.3%
Last synced: 9 months ago

Dependencies

go.mod go
  • github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
go.sum go
  • github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • actions/setup-go v3 composite
  • golangci/golangci-lint-action v3 composite
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/gosec.yml actions
  • actions/checkout v3 composite
  • securego/gosec master composite