Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
8e33745a
Commit
8e33745a
authored
6 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Minor logging changes in CPU load monitoring
parent
123f5ea5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ATxCommon/Monitoring/Cpu.cs
+3
-2
3 additions, 2 deletions
ATxCommon/Monitoring/Cpu.cs
with
3 additions
and
2 deletions
ATxCommon/Monitoring/Cpu.cs
+
3
−
2
View file @
8e33745a
...
...
@@ -115,7 +115,7 @@ namespace ATxCommon.Monitoring
_interval
=
250
;
_limit
=
25
;
_probation
=
40
;
Log
.
Debug
(
"Initializing CPU monitoring..."
);
Log
.
Info
(
"Initializing CPU
load
monitoring..."
);
try
{
Log
.
Debug
(
"CPU monitoring initializing PerformanceCounter (takes one second)..."
);
_cpuCounter
=
new
PerformanceCounter
(
"Processor"
,
"% Processor Time"
,
"_Total"
);
...
...
@@ -165,7 +165,8 @@ namespace ATxCommon.Monitoring
}
else
if
(
_behaving
>
_probation
)
{
Log
.
Trace
(
"CPU load behaving well since {0} cycles."
,
_behaving
);
}
else
if
(
_behaving
<
0
)
{
Log
.
Warn
(
"Integer wrap around happened, resetting probation counter!"
);
Log
.
Info
(
"CPU load monitoring: integer wrap around happened, "
+
"resetting probation counter! (No reason to worry!)"
);
_behaving
=
_probation
+
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment