Commit Graph

7 Commits

Author SHA1 Message Date
Eng Zer Jun 37894e9b28
test: use `T.Setenv` to set env vars in tests
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-12-20 13:13:01 +08:00
quanweiZhou ddaf2d7623 [mem][linux] added additional meminfo fields
support HugePages_Rsvd, HugePages_Surp

Signed-off-by: quanweiZhou <quanweiZhou@linux.alibaba.com>
2022-03-19 15:19:10 +08:00
mmorel-35 1e6b445a8a gofumpt 2021-12-22 21:54:41 +00:00
shirou 0969c9436b delete v2 directory, move v3 to top #1078 2021-11-30 23:47:59 +00:00
Tom Barker 84a665b712 Add mem.SwapDevices() method. 2021-08-19 10:16:30 -04:00
Lomanic cd25417bd7 [mem][linux] Fix #1002 only try to parse /proc/meminfo numeric values on fields we're interested in 2020-11-29 18:03:50 +01:00
Lomanic 07887a9e9f [mem][linux] Add mocked test for VirtualMemory() and fix SReclaimable SUnreclaim retrieval 2020-11-29 17:54:17 +01:00