Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
floodlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
croft1
floodlight
Commits
8f9fea7a
Commit
8f9fea7a
authored
13 years ago
by
Srinivasan Ramasubramanian
Browse files
Options
Downloads
Patches
Plain Diff
Print warning messages when packet-in processing time exceeds a certain threshold.
parent
b5d9e820
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/core/internal/Controller.java
+17
-0
17 additions, 0 deletions
...va/net/floodlightcontroller/core/internal/Controller.java
with
17 additions
and
0 deletions
src/main/java/net/floodlightcontroller/core/internal/Controller.java
+
17
−
0
View file @
8f9fea7a
...
...
@@ -174,6 +174,7 @@ public class Controller
protected
OFMessageFilterManager
messageFilterManager
;
protected
PktinProcessingTime
pktinProcTime
;
private
StaticFlowEntryPusher
staticFlowEntryPusher
;
protected
long
ptWarningThresholdInNano
;
protected
List
<
RestletRoutable
>
restlets
;
...
...
@@ -735,6 +736,8 @@ public class Controller
FloodlightContext
bContext
)
throws
IOException
{
Ethernet
eth
=
null
;
long
startTime
=
System
.
nanoTime
();
switch
(
m
.
getType
())
{
case
PACKET_IN:
...
...
@@ -808,6 +811,13 @@ public class Controller
}
else
{
log
.
error
(
"Unhandled OF Message: {} from {}"
,
m
,
sw
);
}
long
processingTime
=
System
.
nanoTime
()
-
startTime
;
if
(
ptWarningThresholdInNano
>
0
&&
processingTime
>
ptWarningThresholdInNano
)
{
log
.
warn
(
"Time to process packet-in: {} us"
,
processingTime
/
1000.0
);
if
(
eth
!=
null
)
log
.
warn
(
"{}"
,
messageFilterManager
.
getDataAsString
(
sw
,
m
,
bContext
));
}
}
}
...
...
@@ -1431,6 +1441,13 @@ public class Controller
restlets
.
add
(
new
StorageWebRoutable
());
restlets
.
add
(
new
TopologyWebRouteable
());
JacksonCustomConverter
.
replaceConverter
();
// Processing Time Warning Threshold
ptWarningThresholdInNano
=
Long
.
parseLong
(
System
.
getProperty
(
"net.floodlightcontroller.core.PTWarningThresholdInMilli"
,
"0"
))
*
1000000
;
if
(
ptWarningThresholdInNano
>
0
)
{
log
.
info
(
"Packet processing time threshold for warning set to {} ms."
,
ptWarningThresholdInNano
/
1000000
);
}
}
protected
void
initStorageSource
()
{
...
...
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