Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. ewma

ewma

MITGov1.2.0

A Go library implementing Exponentially Weighted Moving Average algorithms for efficient time-series data smoothing.

GitHubGitHub
452 stars38 forks0 contributors

What is ewma?

EWMA is a Go library that provides Exponentially Weighted Moving Average algorithms for continuous computation of averages that bias towards recent data points. It offers computationally inexpensive and memory-efficient implementations, making it suitable for real-time monitoring and time-series analysis where recent trends are more important than distant history.

Target Audience

Go developers building real-time monitoring systems, performance analysis tools, or time-series data processing applications where efficient, incremental averaging of streaming data is required.

Value Proposition

Developers choose EWMA for its specialized, performance-optimized implementations that balance low CPU/memory usage with flexibility, offering both simple constant-decay and configurable variable-decay algorithms through a consistent interface.

Overview

Exponentially Weighted Moving Average algorithms for Go.

Use Cases

Best For

  • Real-time monitoring of system metrics like CPU usage or request latency where recent data points are more indicative of current state.
  • Time-series analysis applications that require incremental averaging without storing full historical data.
  • Building lightweight performance dashboards that need efficient moving average calculations for streaming data.
  • Implementing adaptive thresholds in alerting systems that should respond quickly to recent trends.
  • Processing periodic data streams with fixed intervals where time-implicit decay simplifies integration.
  • Scenarios requiring trade-offs between memory efficiency (SimpleEWMA) and configurable decay with warm-up periods (VariableEWMA).

Not Ideal For

  • Applications with irregularly spaced time-series data, as the library assumes a fixed 1.0 interval between samples and lacks time-based decay support.
  • Scenarios where zero is a legitimate and frequent data point, due to SimpleEWMA's assumption that zero means uninitialized, causing abrupt average jumps.
  • Projects requiring active feature development or custom algorithm extensions, given the maintainers' policy of rejecting new feature pull requests and focusing only on minor fixes.

Pros & Cons

Pros

High Performance Implementation

SimpleEWMA is optimized for low CPU and memory consumption with constant decay, making it ideal for resource-constrained real-time monitoring, as highlighted in the README for efficient incremental averaging.

Flexible Averaging Control

VariableEWMA supports configurable decay ages with a warm-up period, allowing developers to fine-tune responsiveness versus stability for specific time windows, such as setting alpha based on desired average age.

Consistent API Design

Both SimpleEWMA and VariableEWMA conform to the MovingAverage interface, enabling easy swapping and testing of different strategies without code changes, simplifying integration into various Go applications.

Simplified Time Handling

The time-implicit decay model assumes fixed intervals between samples, reducing complexity for periodic data streams like system metrics, as noted in the README for straightforward use in monitoring tools.

Cons

Fixed Time Interval Limitation

The library cannot handle variable time intervals between samples, limiting its use for irregularly spaced data streams, a weakness explicitly admitted in the README with no current support for time-based decay.

Zero Value Handling Quirk

SimpleEWMA interprets a value of zero as uninitialized, leading to sharp average jumps when actual zeros occur in data, which can distort results in datasets where zero readings are common, as warned in the documentation.

Limited Development Scope

The project only accepts pull requests for minor fixes and rejects new features, which may hinder adoption for teams needing evolving or customized moving average algorithms, as stated in the contribution guidelines.

Frequently Asked Questions

Quick Stats

Stars452
Forks38
Contributors0
Open Issues3
Last commit2 years ago
CreatedSince 2013

Tags

#algorithm#data-smoothing#statistics#go-library#monitoring#time-series#moving-average#real-time

Built With

G
Go

Included in

Go169.1k
Auto-fetched 18 hours ago

Related Projects

gonumgonum

Gonum is a set of numeric libraries for the Go programming language. It contains libraries for matrices, statistics, optimization, and more

Stars8,418
Forks580
Last commit3 days ago
statsstats

A well tested and comprehensive Golang statistics library package with no dependencies.

Stars3,022
Forks174
Last commit7 days ago
plotplot

A repository for plotting and visualizing data

Stars2,962
Forks202
Last commit3 months ago
goslgosl

Linear algebra, eigenvalues, FFT, Bessel, elliptic, orthogonal polys, geometry, NURBS, numerical quadrature, 3D transfinite interpolation, random numbers, Mersenne twister, probability distributions, optimisation, differential equations.

Stars1,877
Forks148
Last commit6 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub