Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add process thread stat to snapshot. #45

Merged
merged 4 commits into from
Jun 25, 2022

Conversation

Incarnation-p-lee
Copy link
Owner

  • Only threadsCount involved.

Signed-off-by: Pan Li incarnation.p.lee@outlook.com

* Only threadsCount involved.

Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
@codecov
Copy link

codecov bot commented Jun 25, 2022

Codecov Report

Merging #45 (4f73413) into master (3e37e2c) will decrease coverage by 0.40%.
The diff coverage is 90.36%.

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
- Coverage   86.71%   86.30%   -0.41%     
==========================================
  Files          10       11       +1     
  Lines         286      314      +28     
==========================================
+ Hits          248      271      +23     
- Misses         30       32       +2     
- Partials        8       11       +3     
Impacted Files Coverage Δ
internal/sampling/sampling_process_thread.go 83.33% <83.33%> (ø)
internal/sampling/sampling_process.go 93.47% <92.85%> (+0.45%) ⬆️
pkg/snapshot/snapshot.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e37e2c...4f73413. Read the comment docs.

@guardrails
Copy link

guardrails bot commented Jun 25, 2022

All previously detected findings have been fixed. Good job! 👍🎉

We will keep this comment up-to-date as you go along and notify you of any security issues that we identify.


👉 Go to the dashboard for detailed results.

📥 Happy? Share your feedback with us.


func sampleThreadsCount(pID int) int {
filename := fmt.Sprintf("/proc/%d/status", pID)
file, err := os.Open(filename)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

G304: Potential file inclusion via variable

Reply with "@sonatype-lift help" for more info.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.

When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Incarnation-p-lee and others added 2 commits June 25, 2022 14:29
Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
@sonarcloud
Copy link

sonarcloud bot commented Jun 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Incarnation-p-lee Incarnation-p-lee merged commit 3dfc3c2 into master Jun 25, 2022
@Incarnation-p-lee Incarnation-p-lee deleted the panli/add-process-thread-to-snapshot branch June 25, 2022 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants