Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
e9556924
Commit
e9556924
authored
Apr 12, 2013
by
Thomas Markwalder
Browse files
[2785] Merge branch 'trac2785'. Corrects packet time statistics in
perfdhcp.
parents
c16ff5e7
fbfd9a49
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/tools/perfdhcp/stats_mgr.h
View file @
e9556924
...
...
@@ -262,7 +262,8 @@ public:
/// In this mode all packets are stored throughout the test execution.
ExchangeStats
(
const
ExchangeType
xchg_type
,
const
double
drop_time
,
const
bool
archive_enabled
)
const
bool
archive_enabled
,
const
boost
::
posix_time
::
ptime
boot_time
)
:
xchg_type_
(
xchg_type
),
sent_packets_
(),
rcvd_packets_
(),
...
...
@@ -279,7 +280,8 @@ public:
unordered_lookups_
(
0
),
ordered_lookups_
(
0
),
sent_packets_num_
(
0
),
rcvd_packets_num_
(
0
)
rcvd_packets_num_
(
0
),
boot_time_
(
boot_time
)
{
next_sent_
=
sent_packets_
.
begin
();
}
...
...
@@ -699,9 +701,8 @@ public:
"packet time is not set"
);
}
// Calculate durations of packets from beginning of epoch.
ptime
epoch_time
(
min_date_time
);
time_period
sent_period
(
epoch_time
,
sent_time
);
time_period
rcvd_period
(
epoch_time
,
rcvd_time
);
time_period
sent_period
(
boot_time_
,
sent_time
);
time_period
rcvd_period
(
boot_time_
,
rcvd_time
);
// Print timestamps for sent and received packet.
std
::
cout
<<
"sent / received: "
<<
to_iso_string
(
sent_period
.
length
())
...
...
@@ -803,6 +804,7 @@ public:
uint64_t
sent_packets_num_
;
///< Total number of sent packets.
uint64_t
rcvd_packets_num_
;
///< Total number of received packets.
boost
::
posix_time
::
ptime
boot_time_
;
///< Time when test is started.
};
/// Pointer to ExchangeStats.
...
...
@@ -853,7 +855,8 @@ public:
exchanges_
[
xchg_type
]
=
ExchangeStatsPtr
(
new
ExchangeStats
(
xchg_type
,
drop_time
,
archive_enabled_
));
archive_enabled_
,
boot_time_
));
}
/// \brief Add named custom uint64 counter.
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment