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
747f4518
Commit
747f4518
authored
Jun 02, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify the histogram print function
parent
cf1a24e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
packet-exchange/src/client.c
packet-exchange/src/client.c
+7
-2
packet-exchange/src/utilities.h
packet-exchange/src/utilities.h
+1
-1
No files found.
packet-exchange/src/client.c
View file @
747f4518
...
...
@@ -232,10 +232,15 @@ static void print_histograms() {
\"
props_names
\"
: [
\"
user_space
\"
,
\"
kernel_space
\"
],\
\"
units
\"
: [
\"
us
\"
,
\"
us
\"
],\
\"
props
\"
: ["
);
int
max_hist_val
=
0
;
for
(
int
i
=
0
;
i
<
NB_HISTOGRAMS
;
i
++
)
{
int
max_hist_val
=
MAX_HIST_VAL
;
for
(
int
j
=
0
;
j
<
MAX_HIST_VAL
;
j
++
)
max_hist_val
=
histograms
[
i
][
j
]
?
j
:
max_hist_val
;
if
(
histograms
[
i
][
j
])
max_hist_val
=
j
>
max_hist_val
?
j
:
max_hist_val
;
}
for
(
int
i
=
0
;
i
<
NB_HISTOGRAMS
;
i
++
)
{
printf
(
"["
);
for
(
int
j
=
0
;
j
<
max_hist_val
;
j
++
)
{
...
...
packet-exchange/src/utilities.h
View file @
747f4518
...
...
@@ -11,7 +11,7 @@
#define SERVER_PORT "50000"
#define SERVER_PORT_INT 50000
#define MAX_HIST_VAL 1000
#define NB_HISTOGRAMS
3
#define NB_HISTOGRAMS
2
uint64_t
ts_to_uint
(
struct
timespec
t
);
void
add_ns
(
struct
timespec
*
t
,
uint64_t
ns
);
...
...
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