https://github.com/256dpi/mgots
a wrapper for mgo that turns MongoDB into a time series database
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
Repository
a wrapper for mgo that turns MongoDB into a time series database
Basic Info
Statistics
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 7
Topics
Metadata Files
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
- Website: https://joelgaehwiler.com
- Twitter: 256dpi
- Repositories: 56
- Profile: https://github.com/256dpi
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.
- Homepage: https://github.com/256dpi/mgots
- Documentation: https://pkg.go.dev/github.com/256dpi/mgots#section-documentation
- License: MIT
-
Latest release: v0.4.0
published about 7 years ago