Skip to content

Commit

Permalink
chore: code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiandongx committed Aug 10, 2024
1 parent a644156 commit 8e72220
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion viewer/heap.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const (
VHeap = "heap"
)

// HeapViewer collects the heap-Stats metrics via `runtime.ReadMemStats()`
// HeapViewer collects the heap-stats metrics via `runtime.ReadMemStats()`
type HeapViewer struct {
smgr *StatsMgr
graph *charts.Line
Expand Down
2 changes: 1 addition & 1 deletion viewer/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const (
VCStack = "stack"
)

// StackViewer collects the stack-Stats metrics via `runtime.ReadMemStats()`
// StackViewer collects the stack-stats metrics via `runtime.ReadMemStats()`
type StackViewer struct {
smgr *StatsMgr
graph *charts.Line
Expand Down
15 changes: 1 addition & 14 deletions viewer/viewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func WithMaxPoints(n int) Option {
}
}

// WithTemplate sets the rendered template which fetching Stats from the server and
// WithTemplate sets the rendered template which fetching stats from the server and
// handling the metrics data
func WithTemplate(t string) Option {
return func(c *config) {
Expand Down Expand Up @@ -169,19 +169,6 @@ type Viewer interface {
SetStatsMgr(smgr *StatsMgr)
}

//type statsEntity struct {
// mut sync.Mutex
// stats runtime.MemStats
// ts string
//}
//
//var statsEntityMut sync.Mutex
//var innerStatsEntity = &statsEntity{}
//
//func getStatsEntity() statsEntity {
//
//}

type StatsMgr struct {
last atomic.Int64
ctx context.Context
Expand Down

0 comments on commit 8e72220

Please sign in to comment.