-
Notifications
You must be signed in to change notification settings - Fork 97
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
Collect nydusd startup cpu utilization and report its mem usage #279
Conversation
Codecov ReportBase: 33.30% // Head: 33.06% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #279 +/- ##
==========================================
- Coverage 33.30% 33.06% -0.24%
==========================================
Files 29 29
Lines 3129 3151 +22
==========================================
Hits 1042 1042
- Misses 1979 2001 +22
Partials 108 108
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
916878e
to
0662489
Compare
Moreover, LGTM. |
@@ -32,27 +33,48 @@ var ( | |||
PageSize = GetPageSize() | |||
) | |||
|
|||
func GetCurrentStat(pid int) (*Stat, error) { | |||
func CalculateCPUUtilization(begin *Stat, now *Stat) float64 { | |||
cpuSys := (now.Stime - begin.Stime) / ClkTck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should check whether the begin
and now
are not nil before using them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
0662489
to
a02f614
Compare
@sctb512 Mind take another look? |
Collect some metrics about nydusd system resource consumption during its startup procedure.
It will be helpful when analyze application startup latency