Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
tsn-measures
Commits
f30202f7
Commit
f30202f7
authored
Jun 03, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Register jitter values in a histogram on the server
parent
9c0e6694
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
packet-exchange/src/server.c
packet-exchange/src/server.c
+9
-1
No files found.
packet-exchange/src/server.c
View file @
f30202f7
...
...
@@ -141,6 +141,14 @@ static void *packet_receiving_thread(void *p) {
diff
=
calcdiff_ns
(
current
,
previous
);
stats
->
min_interval
=
diff
<
stats
->
min_interval
?
diff
:
stats
->
min_interval
;
stats
->
max_interval
=
diff
>
stats
->
max_interval
?
diff
:
stats
->
max_interval
;
if
(
diff
>
MAX_HIST_VAL
*
1000
)
{
fprintf
(
stderr
,
"jitter higher than MAX_HIST_VAL
\n
"
);
exit
(
EXIT_FAILURE
);
}
else
{
histograms
[
2
][
diff
/
1000
]
=
diff
/
1000
;
}
}
previous
=
current
;
...
...
@@ -235,7 +243,7 @@ static void print_histograms() {
duration_hour
=
duration
/
NSEC_PER_SEC
/
3600
;
duration_minutes
=
duration
/
NSEC_PER_SEC
/
60
-
duration_hour
*
60
;
interval
=
(
param
->
stats
.
min_interval
+
param
->
stats
.
max_interval
)
/
2
;
interval
=
(
param
->
stats
.
min_interval
+
param
->
stats
.
max_interval
)
/
2
/
1000
;
printf
(
"{
\"
measure_sets
\"
: [{"
"
\"
measure_type
\"
:
\"
packet_recv_timestamps
\"
,"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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