Matthieu MOREL
b0469a470b
Merge branch 'master' into master
2022-02-01 19:28:26 +01:00
Ville Skyttä
1e56c6f421
Spelling and grammar fixes
2022-01-30 22:48:09 +02:00
Matthieu MOREL
8ba220d241
enable contextcheck linter
2022-01-24 09:26:50 +01:00
shirou
b4808b3e94
Merge pull request #1204 from YangKeao/fix-unstable-boottime
...
fix unstable boot time because of float conversion
2022-01-06 21:09:53 +09:00
shirou
2f8da0a394
Merge pull request #1205 from mmorel-35/master
...
enable more linters, report coverage and cache mods
2021-12-29 22:31:24 +09:00
Makazeu
521fafd945
Fix a typo in comment
2021-12-24 17:14:50 +08:00
Matthieu MOREL
851bffc0f1
enable gosec linter
2021-12-23 00:31:04 +01:00
mmorel-35
1e6b445a8a
gofumpt
2021-12-22 21:54:41 +00:00
shirou
69ea4bfdae
Merge pull request #1194 from mmorel-35/master
...
Enable errorlint and gci linters
2021-12-22 21:43:03 +09:00
YangKeao
1b5757b7d1
fix unstable boot time because of float conversion
...
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
2021-12-21 16:14:07 +08:00
wyl
5a288fb852
Fix bug for func named ReadLinesOffsetN
2021-12-20 09:07:46 +08:00
Matthieu MOREL
b673968d5d
enable errorlint linter
2021-12-04 22:29:38 +01:00
shirou
d2e27c1712
fix dependabot v2 deletion.
2021-12-01 00:12:55 +00:00
shirou
0969c9436b
delete v2 directory, move v3 to top #1078
2021-11-30 23:47:59 +00:00
shirou
0fdf65fa3e
Change to use yusufpapurcu/wmi from StackExchange/wmi.
2021-11-20 11:36:30 +00:00
shirou
0ce33dbe64
Merge pull request #1166 from easyops-cn/kestrel/process
...
feat(process): implement the 'OpenFilesWithContext' function of the windows system
2021-11-13 20:51:25 +09:00
kestrel
3dabe50107
feat(process): implement the 'OpenFilesWithContext' function of the windows system
2021-10-11 05:30:29 +08:00
Ville Skyttä
a21240a319
Simplify some if blocks
2021-08-18 17:09:11 +03:00
Ville Skyttä
fb0c322260
Check error identity with errors.Is
2021-08-18 17:09:11 +03:00
Ville Skyttä
633e77013f
Use short if
2021-08-18 17:09:11 +03:00
Ville Skyttä
ce9d35436e
Merge variable declaration with assignment
2021-08-18 17:09:11 +03:00
Ville Skyttä
5d0724f42f
Comment convention fixes
2021-08-18 17:09:03 +03:00
Ville Skyttä
65616500e8
Remove unnecessary empty lines
2021-08-18 16:42:17 +03:00
Ville Skyttä
a9b1ce2dec
Remove unnecessary conversions
2021-08-18 16:42:11 +03:00
Ville Skyttä
7743265113
Rewrite if-else chains as switches
2021-08-18 16:37:51 +03:00
shirou
2fa855f295
add MockEnv as more generic function.
2021-05-08 21:18:46 +09:00
Johannes Drummer
76fb312c4b
delete unused PdhAddCounterW
2021-02-06 13:11:41 +01:00
Johannes Drummer
82b235c9f5
v2 windows counters on non english systems
2021-02-06 11:01:29 +01:00
AtakanColak
498a39984d
tidy comments
2020-11-06 11:07:02 +03:00
AtakanColak
2c98f69e11
add load v2
...
tidied up common/windows
added load benchmark for load_test
cpu percent is used as load if queue is zero
2020-11-02 16:54:39 +03:00
AtakanColak
24e6d6d350
add load to windows
2020-10-22 17:44:11 +03:00
Atakan
3504ea07b0
simplify virt cache
2020-10-13 11:06:20 +03:00
shirou
b94f262e7d
Merge pull request #949 from boogie-byte/vet-target
...
Add "vet" target to the Makefile
2020-10-11 23:01:10 +09:00
Sergey Vinogradov
8ff2ab3187
Add "vet" target to the Makefile
...
Making the "vet" target will run "go vet ./..." for each supported
GOOS.
Also, some of the warnings produced by go 1.15 vet were mitigated.
2020-10-10 16:50:49 +03:00
Ryan Fitzpatrick
8046134504
Fix VirtualizationWithContext() race in linux
2020-10-06 17:03:49 +00:00
shirou
5084874a4c
Merge pull request #942 from AtakanColak/patch-1
...
Cache common/common_linux.Virtualization()
2020-10-01 11:56:51 +09:00
Ata
ba243b1d14
removed explicit set to nil
2020-09-29 10:12:48 +03:00
Ata
5fd5d64304
Cache common/common_linux.Virtualization()
...
By assuming virtualization environment won't change during a the program's runtime, we can cache common/common_linux.Virtualization() with a simple map to reduce amount of system calls. I first mentioned this issue at https://github.com/shirou/gopsutil/pull/890#issuecomment-690211919
2020-09-11 10:41:01 +03:00
Lomanic
e1082dabb6
[process][darwin] Fix #925 remove references to removed const unix.SYS___SYSCTL from x/sys/unix
...
More like a workaround, wanted to port process.getKProcWithContext() to use unix.SysctlRaw() to get rid of exec calls to ps
in the same time but didn't have time.
2020-09-08 11:44:46 +02:00
ninedraft
baf3495197
use legacy error check in the common.TestSleep
2020-09-03 23:07:04 +03:00
ninedraft
34df4904f6
use cancelable sleep in cpu.PercentWithContext and process.Process.PercentWithContext
2020-09-03 23:01:53 +03:00
Mihir Singh
92d6df6d8f
Attempted LXC guest detection from environ procfile
2020-06-21 09:13:34 +00:00
Lomanic
c89193f22d
Merge pull request #857 from Gui13/fix_837
...
Do not cache boot time for linux. Fix #837
2020-05-17 22:47:08 +02:00
Mauro Leggieri
00957cfedc
Fixed slow command line retrieval on Windows
2020-04-30 22:44:43 -03:00
Guillaume Bienkowski
aeb3b6b1c7
Do not cache boot time for linux. Fix #837
2020-04-15 13:52:34 +02:00
Ilya Prudnikov
256e00319e
implement proposed solution
2020-01-20 20:13:45 +02:00
shirou
a21ed69d3a
Revert "Merge pull request #763 from Iqoqo/add-android-support-for-host"
...
This reverts commit f58b2e3677
, reversing
changes made to 84e6215770
.
2019-09-15 09:49:07 +09:00
Ilya Guterman
11244886bb
add android support for host
2019-09-08 19:45:04 +03:00
Kris Watts
c3720007e4
Fixes issue #730
2019-07-26 12:05:16 -06:00
Lomanic
47323f9ad5
[process][windows] Fix #586 use win32 API in process.Exe() instead of slow WMI call
...
This is faster by a factor of 100.
References:
5f4287d17f/psutil/_pswindows.py (L221)
921870d540/psutil/_psutil_windows.c (L1211)
921870d540/psutil/_psutil_windows.c (L626)
2019-06-16 23:03:27 +02:00