Skip to content

Commit

Permalink
Merge pull request #77 from v3io/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
dinal authored Nov 11, 2020
2 parents 5787e83 + ff7d318 commit 8d3e0b7
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 35 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ require (
replace (
github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422
github.com/v3io/frames => github.com/v3io/frames v0.8.1
github.com/v3io/v3io-tsdb => github.com/v3io/v3io-tsdb v0.11.3
github.com/v3io/v3io-tsdb => github.com/v3io/v3io-tsdb v0.11.4
google.golang.org/grpc => google.golang.org/grpc v1.19.1
k8s.io/klog => github.com/simonpasquier/klog-gokit v0.1.0
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ github.com/v3io/v3io-go v0.1.9 h1:etkrrRmrI++i8sxGfK/+13f41TxIMohYeZHwVUM62vw=
github.com/v3io/v3io-go v0.1.9/go.mod h1:5poBlcjZG5TiexRTYI44PE6tHzZz5Z60w+iS899pWtc=
github.com/v3io/v3io-tsdb v0.11.3 h1:zH2rVNsPy9CIm0/gwJ7NNyjDD7G2w4XhUygeZqexLaE=
github.com/v3io/v3io-tsdb v0.11.3/go.mod h1:kp586KxTfROIGwb/nzNxwDbX2Wterxro+HbiZHmK548=
github.com/v3io/v3io-tsdb v0.11.4 h1:tDw+EdFNregIy6r4fPqtOybkAj4ngUl4WRQNH24Xe0M=
github.com/v3io/v3io-tsdb v0.11.4/go.mod h1:kp586KxTfROIGwb/nzNxwDbX2Wterxro+HbiZHmK548=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.2.0 h1:dzZJf2IuMiclVjdw0kkT+f9u4YdrapbNyGAN47E/qnk=
Expand Down
7 changes: 1 addition & 6 deletions vendor/github.com/v3io/v3io-tsdb/pkg/appender/appender.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/github.com/v3io/v3io-tsdb/pkg/appender/ingest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions vendor/github.com/v3io/v3io-tsdb/pkg/appender/lru_cache.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/v3io/v3io-tsdb/pkg/appender/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ github.com/v3io/v3io-go/pkg/dataplane
github.com/v3io/v3io-go/pkg/dataplane/http
github.com/v3io/v3io-go/pkg/dataplane/schemas/node/common
github.com/v3io/v3io-go/pkg/errors
# github.com/v3io/v3io-tsdb v0.11.2 => github.com/v3io/v3io-tsdb v0.11.3
# github.com/v3io/v3io-tsdb v0.11.2 => github.com/v3io/v3io-tsdb v0.11.4
github.com/v3io/v3io-tsdb/internal/pkg/performance
github.com/v3io/v3io-tsdb/pkg/aggregate
github.com/v3io/v3io-tsdb/pkg/appender
Expand Down
17 changes: 10 additions & 7 deletions web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import (
v3ioConfig "github.com/v3io/v3io-tsdb/pkg/config"
)


var (
localhostRepresentations = []string{"127.0.0.1", "localhost"}

Expand Down Expand Up @@ -828,13 +829,15 @@ func (h *Handler) status(w http.ResponseWriter, r *http.Request) {
status.LastConfigTime = time.Unix(int64(toFloat64(mF)), 0)
}
}
db := h.tsdb()
startTime := time.Now().UnixNano()
status.Stats = db.Head().PostingsCardinalityStats("__name__")
status.Duration = fmt.Sprintf("%.3f", float64(time.Now().UnixNano()-startTime)/float64(1e9))
status.NumSeries = db.Head().NumSeries()
status.MaxTime = db.Head().MaxTime()
status.MinTime = db.Head().MaxTime()
// TODO: Implement for V3IO (IG-16879)
//db := h.tsdb()
//startTime := time.Now().UnixNano()
status.Stats = &index.PostingsStats{}
//status.Stats = db.Head().PostingsCardinalityStats("__name__")
//status.Duration = fmt.Sprintf("%.3f", float64(time.Now().UnixNano()-startTime)/float64(1e9))
//status.NumSeries = db.Head().NumSeries()
//status.MaxTime = db.Head().MaxTime()
//status.MinTime = db.Head().MaxTime()

h.executeTemplate(w, "status.html", status)
}
Expand Down

0 comments on commit 8d3e0b7

Please sign in to comment.