Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[process][windows] Retrieve process name as basename of executable
We align ourself with psutil https://github.com/giampaolo/psutil/blob/8e4099d9f063ceb4ee3da5845562c5b934f83544/psutil/_pswindows.py#L749-L759 Benchmarks show vast improvements go test -run=BenchmarkProcessName -bench=BenchmarkProcessName ./process goos: windows goarch: amd64 pkg: github.com/shirou/gopsutil/v3/process cpu: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz BenchmarkProcessName-4 180 6564033 ns/op BenchmarkProcessNameViaExe-4 22111 51153 ns/op PASS ok github.com/shirou/gopsutil/v3/process 3.914s Fixes shirou#1368
- Loading branch information