shirou_gopsutil/process
Lomanic 980cc82c08 [process][windows] Retrieve process name as basename of executable
We align ourself with psutil
8e4099d9f0/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 #1368
2022-10-22 21:43:23 +02:00
..
testdata Drop test for Darwin Pids() 2022-01-13 13:27:05 +01:00
process.go Spelling and grammar fixes 2022-01-30 22:48:09 +02:00
process_bsd.go gofumpt 2021-12-22 21:54:41 +00:00
process_darwin.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
process_darwin_amd64.go gofumpt 2021-12-22 21:54:41 +00:00
process_darwin_arm64.go gofumpt 2021-12-22 21:54:41 +00:00
process_darwin_cgo.go Fix memory leaks in darwin_cgo 2022-10-04 14:35:52 -04:00
process_darwin_nocgo.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
process_fallback.go [process] implement ParentWithContext using PpidWithContext 2022-01-22 18:27:52 +02:00
process_freebsd.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
process_freebsd_386.go run go fmt ./... 2017-02-01 23:05:29 +00:00
process_freebsd_amd64.go run go fmt ./... 2017-02-01 23:05:29 +00:00
process_freebsd_arm.go Add native struct support for FreeBSD/arm. 2017-02-01 08:25:48 -08:00
process_freebsd_arm64.go gofumpt 2021-12-22 21:54:41 +00:00
process_linux.go fix(process,linux): remove trailing multiple \x00 2022-07-12 09:49:23 +00:00
process_linux_test.go enable contextcheck linter 2022-01-24 09:26:50 +01:00
process_openbsd.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
process_openbsd_386.go gofumpt 2021-12-22 21:54:41 +00:00
process_openbsd_amd64.go run go fmt ./... 2017-02-01 23:05:29 +00:00
process_openbsd_arm.go host: add support for OpenBSD/armv7 2022-04-15 21:11:36 +02:00
process_openbsd_arm64.go gofumpt 2021-12-22 21:54:41 +00:00
process_plan9.go [process] implement ParentWithContext using PpidWithContext 2022-01-22 18:27:52 +02:00
process_posix.go gofumpt 2021-12-22 21:54:41 +00:00
process_posix_test.go gofumpt 2021-12-22 21:54:41 +00:00
process_race_test.go gofumpt 2021-12-22 21:54:41 +00:00
process_solaris.go [process] implement ParentWithContext using PpidWithContext 2022-01-22 18:27:52 +02:00
process_test.go [process][windows] Retrieve process name as basename of executable 2022-10-22 21:43:23 +02:00
process_windows.go [process][windows] Retrieve process name as basename of executable 2022-10-22 21:43:23 +02:00
process_windows_32bit.go [process][windows] Fix #1216 fix compilation on arm/arm64 2022-01-05 01:09:23 +01:00
process_windows_64bit.go [process][windows] Fix #1216 fix compilation on arm/arm64 2022-01-05 01:09:23 +01:00
types_darwin.go gofumpt 2021-12-22 21:54:41 +00:00
types_freebsd.go gofumpt 2021-12-22 21:54:41 +00:00
types_openbsd.go gofumpt 2021-12-22 21:54:41 +00:00