-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add the number of threads on the information collected per process (#100
) * On linux: - it extends the information parsed from /proc/[PID]/stat to get the total thread count - unit tests added, they mock /proc/[PID]/stat * On darwin: - it uses the syscall proc_pidinfo - unit test only validates GetInfoForPid does not return an error and the total thread count ins't zero * On windows: - it uses the Process Snapshotting APIs: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/proc_snap/overview-of-process-snapshotting - unit test only validates GetInfoForPid does not return an error and the total thread count ins't * Add a unit test using a C++ program which runs exactly 42 threads so we can assert the data read by process.GetInfoForPid On windows the and newer the process start with more threads than the program requests to parallel load needed tabels/dll or some windows specific things. Therefore the test on windows accepts 42 or 45 for the number of threads allocated to the process. See the following for details https://stackoverflow.com/questions/42789199/why-there-are-three-unexpected-worker-threads-when-a-win32-console-application-s/42789684#42789684
- Loading branch information
Showing
19 changed files
with
657 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -645,11 +645,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/go-structform@v | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : github.com/elastic/go-sysinfo | ||
Version: v1.10.0 | ||
Version: v1.10.1 | ||
Licence type (autodetected): Apache-2.0 | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].0/LICENSE.txt: | ||
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].1/LICENSE.txt: | ||
|
||
|
||
Apache License | ||
|
@@ -1935,11 +1935,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/go-licence-detector@ | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : golang.org/x/sys | ||
Version: v0.6.0 | ||
Version: v0.7.0 | ||
Licence type (autodetected): BSD-3-Clause | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.6.0/LICENSE: | ||
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.7.0/LICENSE: | ||
|
||
Copyright (c) 2009 The Go Authors. All rights reserved. | ||
|
||
|
@@ -2379,11 +2379,11 @@ Apache License | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : github.com/docker/docker | ||
Version: v20.10.24+incompatible | ||
Version: v23.0.3+incompatible | ||
Licence type (autodetected): Apache-2.0 | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/github.com/docker/docker@v20.10.24+incompatible/LICENSE: | ||
Contents of probable licence file $GOMODCACHE/github.com/docker/docker@v23.0.3+incompatible/LICENSE: | ||
|
||
|
||
Apache License | ||
|
@@ -5903,37 +5903,6 @@ DEALINGS IN THE SOFTWARE. | |
|
||
|
||
|
||
-------------------------------------------------------------------------------- | ||
Dependency : github.com/sirupsen/logrus | ||
Version: v1.9.0 | ||
Licence type (autodetected): MIT | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/github.com/sirupsen/[email protected]/LICENSE: | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2014 Simon Eskildsen | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
|
||
-------------------------------------------------------------------------------- | ||
Dependency : github.com/spf13/cobra | ||
Version: v1.3.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.