https://github.com/256dpi/mgots

a wrapper for mgo that turns MongoDB into a time series database

https://github.com/256dpi/mgots

Science Score: 13.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
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (2.1%) to scientific vocabulary

Keywords

go golang metrics mgo mongo mongodb time-series
Last synced: 6 months ago · JSON representation

Repository

a wrapper for mgo that turns MongoDB into a time series database

Basic Info
  • Host: GitHub
  • Owner: 256dpi
  • License: mit
  • Language: Go
  • Default Branch: master
  • Homepage:
  • Size: 61.5 KB
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 7
Archived
Topics
go golang metrics mgo mongo mongodb time-series
Created over 8 years ago · Last pushed almost 5 years ago
Metadata Files
Readme License

README.md

mgots

A wrapper for mgo that turns MongoDB into a time series database.

Example

```go // get time series collection coll := Wrap(db.C("metrics"), OneMinuteOf60Seconds)

// ensure indexes err := coll.EnsureIndexes(0) if err != nil { panic(err) }

// prepare tags tags := bson.M{"server": "localhost"}

// add some metrics from := time.Now() to := time.Now() for i := 0; i < 100; i++ { coll.Insert(to, map[string]float64{ "value": float64(i), }, tags)

to = to.Add(time.Second)

}

// get data ts, err := coll.AggregateSamples(from, to, []string{"value"}, tags) if err != nil { panic(err) }

// print fmt.Println(ts.Num("value")) fmt.Println(ts.Sum("value")) fmt.Println(ts.Min("value")) fmt.Println(ts.Max("value")) fmt.Println(ts.Avg("value"))

// Output: // 100 // 4950 // 0 // 99 // 49.5 ```

Owner

  • Name: Joël Gähwiler
  • Login: 256dpi
  • Kind: user
  • Location: Zürich, Switzerland
  • Company: @sternenbauer

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
proxy.golang.org: github.com/256dpi/mgots

Package mgots is a wrapper for mgo that turns MongoDB into a time series database.

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 6 months ago