Skip to content

Commit

Permalink
fix(meminfo): remove bytes versions of fields that aren't bytes
Browse files Browse the repository at this point in the history
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
  • Loading branch information
tjhop committed Sep 27, 2023
1 parent f7b4621 commit 325db76
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions meminfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@ type Meminfo struct {
ShmemPmdMappedBytes *uint64
CmaTotalBytes *uint64
CmaFreeBytes *uint64
HugePagesTotalBytes *uint64
HugePagesFreeBytes *uint64
HugePagesRsvdBytes *uint64
HugePagesSurpBytes *uint64
HugepagesizeBytes *uint64
DirectMap4kBytes *uint64
DirectMap2MBytes *uint64
Expand Down Expand Up @@ -363,16 +359,12 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) {
m.CmaFreeBytes = &valBytes
case "HugePages_Total:":
m.HugePagesTotal = &val
m.HugePagesTotalBytes = &valBytes
case "HugePages_Free:":
m.HugePagesFree = &val
m.HugePagesFreeBytes = &valBytes
case "HugePages_Rsvd:":
m.HugePagesRsvd = &val
m.HugePagesRsvdBytes = &valBytes
case "HugePages_Surp:":
m.HugePagesSurp = &val
m.HugePagesSurpBytes = &valBytes
case "Hugepagesize:":
m.Hugepagesize = &val
m.HugepagesizeBytes = &valBytes
Expand Down
4 changes: 0 additions & 4 deletions meminfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ func TestMeminfo(t *testing.T) {
VmallocChunkBytes: newuint64(35184269148160),
HardwareCorruptedBytes: newuint64(0),
AnonHugePagesBytes: newuint64(12582912),
HugePagesTotalBytes: newuint64(0),
HugePagesFreeBytes: newuint64(0),
HugePagesRsvdBytes: newuint64(0),
HugePagesSurpBytes: newuint64(0),
HugepagesizeBytes: newuint64(2097152),
DirectMap4kBytes: newuint64(93323264),
DirectMap2MBytes: newuint64(16424894464),
Expand Down

0 comments on commit 325db76

Please sign in to comment.