Skip to content

Commit

Permalink
Start move to 64-bit ints
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Apr 7, 2015
1 parent d36bc32 commit 2755c26
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
56 changes: 28 additions & 28 deletions diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,20 @@ func (s *SystemDiagnostics) AsRow(measurement string, tags map[string]string) *i

// MemoryDiagnostics captures Go memory stats.
type MemoryDiagnostics struct {
Alloc int
TotalAlloc int
Sys int
Lookups int
Mallocs int
Frees int
HeapAlloc int
HeapSys int
HeapIdle int
HeapInUse int
HeapReleased int
HeapObjects int
PauseTotalNs int
NumGC int
Alloc int64
TotalAlloc int64
Sys int64
Lookups int64
Mallocs int64
Frees int64
HeapAlloc int64
HeapSys int64
HeapIdle int64
HeapInUse int64
HeapReleased int64
HeapObjects int64
PauseTotalNs int64
NumGC int64
}

// NewMemoryDiagnostics returns a MemoryDiagnostics object.
Expand All @@ -95,20 +95,20 @@ func NewMemoryDiagnostics() *MemoryDiagnostics {
runtime.ReadMemStats(&m)

return &MemoryDiagnostics{
Alloc: int(m.Alloc),
TotalAlloc: int(m.TotalAlloc),
Sys: int(m.Sys),
Lookups: int(m.Lookups),
Mallocs: int(m.Mallocs),
Frees: int(m.Frees),
HeapAlloc: int(m.HeapAlloc),
HeapSys: int(m.HeapSys),
HeapIdle: int(m.HeapIdle),
HeapInUse: int(m.HeapInuse),
HeapReleased: int(m.HeapReleased),
HeapObjects: int(m.HeapObjects),
PauseTotalNs: int(m.PauseTotalNs),
NumGC: int(m.NumGC),
Alloc: int64(m.Alloc),
TotalAlloc: int64(m.TotalAlloc),
Sys: int64(m.Sys),
Lookups: int64(m.Lookups),
Mallocs: int64(m.Mallocs),
Frees: int64(m.Frees),
HeapAlloc: int64(m.HeapAlloc),
HeapSys: int64(m.HeapSys),
HeapIdle: int64(m.HeapIdle),
HeapInUse: int64(m.HeapInuse),
HeapReleased: int64(m.HeapReleased),
HeapObjects: int64(m.HeapObjects),
PauseTotalNs: int64(m.PauseTotalNs),
NumGC: int64(m.NumGC),
}
}

Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3197,7 +3197,7 @@ func (s *Server) DiagnosticsAsRows() []*influxql.Row {
"path", "authEnabled", "index", "retentionAutoCreate", "numShards", "cqLastRun"},
Tags: tags,
Values: [][]interface{}{[]interface{}{now, startTime.String(), time.Since(startTime).String(), strconv.FormatUint(s.id, 10),
s.path, s.authenticationEnabled, int(s.index), s.RetentionAutoCreate, len(s.shards), s.lastContinuousQueryRun.String()}},
s.path, s.authenticationEnabled, int64(s.index), s.RetentionAutoCreate, len(s.shards), s.lastContinuousQueryRun.String()}},
}

// Shard groups.
Expand Down

0 comments on commit 2755c26

Please sign in to comment.