Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Thomas Vachuska
2015-07-22 10:56:16 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b19bffb664fe587f761e01846c832de844669c02
b19bffb6
1 parent
bdd31303
Hunting down elusive source of lag.
Change-Id: I9380bc5238202aeac7cbf89c32121b088451e02d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java
core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java
View file @
b19bffb
...
...
@@ -245,10 +245,13 @@ public class FlowObjectiveManager implements FlowObjectiveService {
// Attempt to lookup the handler in the cache
DriverHandler
handler
=
driverHandlers
.
get
(
deviceId
);
cTime
=
now
();
if
(
handler
==
null
)
{
try
{
// Otherwise create it and if it has pipeline behaviour, cache it
handler
=
driverService
.
createHandler
(
deviceId
);
dTime
=
now
();
if
(!
handler
.
driver
().
hasBehaviour
(
Pipeliner
.
class
))
{
log
.
warn
(
"Pipeline behaviour not supported for device {}"
,
deviceId
);
...
...
@@ -260,6 +263,7 @@ public class FlowObjectiveManager implements FlowObjectiveService {
}
driverHandlers
.
put
(
deviceId
,
handler
);
eTime
=
now
();
}
// Always (re)initialize the pipeline behaviour
...
...
@@ -330,7 +334,7 @@ public class FlowObjectiveManager implements FlowObjectiveService {
// Temporary mechanism to monitor pipeliner setup time-cost; there are
// intermittent time where this takes in excess of 2 seconds. Why?
private
long
start
=
0
,
totals
=
0
,
count
=
0
;
private
long
hTime
,
hbTime
;
private
long
cTime
,
dTime
,
eTime
,
hTime
,
hbTime
;
private
static
final
long
LIMIT
=
500
;
private
long
now
()
{
...
...
@@ -342,13 +346,14 @@ public class FlowObjectiveManager implements FlowObjectiveService {
totals
+=
duration
;
count
+=
1
;
if
(
duration
>
LIMIT
)
{
log
.
info
(
"Pipeline setup took {} ms; avg {} ms; hTime={}, hbTime={}"
,
duration
,
totals
/
count
,
diff
(
hTime
),
diff
(
hbTime
));
log
.
info
(
"Pipeline setup took {} ms; avg {} ms;
cTime={}, dTime={}, eTime={},
hTime={}, hbTime={}"
,
duration
,
totals
/
count
,
diff
(
cTime
),
diff
(
dTime
),
diff
(
eTime
),
diff
(
hTime
),
diff
(
hbTime
));
}
}
private
long
diff
(
long
bTime
)
{
return
bTime
-
start
;
long
diff
=
bTime
-
start
;
return
diff
<
0
?
0
:
diff
;
}
// Processing context for initializing pipeline driver behaviours.
...
...
Please
register
or
login
to post a comment