Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cristalhq/pgstats
Postgres statistics for Go
https://github.com/cristalhq/pgstats
go golang monitoring postgres statistics tables
Last synced: about 9 hours ago
JSON representation
Postgres statistics for Go
- Host: GitHub
- URL: https://github.com/cristalhq/pgstats
- Owner: cristalhq
- License: mit
- Created: 2019-10-17T20:49:28.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T20:16:35.000Z (about 5 years ago)
- Last Synced: 2024-06-20T03:36:33.614Z (5 months ago)
- Topics: go, golang, monitoring, postgres, statistics, tables
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pgstats
[![Build Status][build-img]][build-url]
[![GoDoc][doc-img]][doc-url]
[![Go Report Card][reportcard-img]][reportcard-url]
[![Coverage][coverage-img]][coverage-url]Postgres statistics.
## Features
* Supportes versions (see https://www.postgresql.org/support/versioning/)
- 9.4.x
- 9.5.x
- 9.6.x
- 10.x
- 11.x
- 12.x## Install
Go version 1.13
```
go get github.com/cristalhq/pgstats
```## Example
```go
var db *sql.DB
// init dbstats, err := New(db)
if err != nil {
...
}all, err := stats.AllIndexes()
if err != nil {
...
}for _, index := range all {
fmt.Printf("index name: %v\n", index.Indexrelname)
}
```## Documentation
See [these docs](https://godoc.org/github.com/cristalhq/pgstats).
## License
[MIT License](LICENSE).
[build-img]: https://github.com/cristalhq/pgstats/workflows/Go/badge.svg
[build-url]: https://github.com/cristalhq/pgstats/actions
[doc-img]: https://godoc.org/github.com/cristalhq/pgstats?status.svg
[doc-url]: https://godoc.org/github.com/cristalhq/pgstats
[reportcard-img]: https://goreportcard.com/badge/cristalhq/pgstats
[reportcard-url]: https://goreportcard.com/report/cristalhq/pgstats
[coverage-img]: https://codecov.io/gh/cristalhq/pgstats/branch/master/graph/badge.svg
[coverage-url]: https://codecov.io/gh/cristalhq/pgstats