Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
Signed-off-by: bufferflies <1045931706@qq.com>
  • Loading branch information
bufferflies authored and ti-chi-bot committed Jan 4, 2024
1 parent 64d4010 commit d1c9884
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/memory/meminfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ func MemTotalNormal() (uint64, error) {
if time.Since(t) < 60*time.Second {
return total, nil
}
return memTotalNormal()
return totalMem()
}

func memTotalNormal() (uint64, error) {
func totalMem() (uint64, error) {
v, err := mem.VirtualMemory()
if err != nil {
return 0, err

Check warning on line 61 in pkg/memory/meminfo.go

View check run for this annotation

Codecov / codecov/patch

pkg/memory/meminfo.go#L61

Added line #L61 was not covered by tests
Expand Down Expand Up @@ -200,7 +200,7 @@ func InitMemoryHook() {
if err != nil {
return

Check warning on line 201 in pkg/memory/meminfo.go

View check run for this annotation

Codecov / codecov/patch

pkg/memory/meminfo.go#L199-L201

Added lines #L199 - L201 were not covered by tests
}
physicalValue, err := memTotalNormal()
physicalValue, err := totalMem()
if err != nil {
return

Check warning on line 205 in pkg/memory/meminfo.go

View check run for this annotation

Codecov / codecov/patch

pkg/memory/meminfo.go#L203-L205

Added lines #L203 - L205 were not covered by tests
}
Expand Down

0 comments on commit d1c9884

Please sign in to comment.