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
db791847
Commit
db791847
authored
Jun 11, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve timestamp prints
parent
c1fa2847
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
packet-exchange/src/client.c
packet-exchange/src/client.c
+3
-4
packet-exchange/src/server.c
packet-exchange/src/server.c
+2
-4
No files found.
packet-exchange/src/client.c
View file @
db791847
...
...
@@ -218,10 +218,9 @@ int main(int argc, char *argv[]) {
int64_t
user_space_time
=
stats
->
packet_info
.
userspace_exit_ts
-
stats
->
packet_info
.
userspace_enter_ts
;
int64_t
kernel_space_time
=
stats
->
packet_info
.
kernelspace_ts
-
stats
->
packet_info
.
userspace_exit_ts
;
printf
(
"(%d) User space time: %"
PRIi64
"
\n
"
,
stats
->
nb_cycles
,
user_space_time
);
printf
(
"(%d) Kernel space time: %"
PRIi64
"
\n
"
,
stats
->
nb_cycles
,
kernel_space_time
);
printf
(
"(%d) User and kernel space time: %*"
PRIi64
", %"
PRIi64
"
\n
"
,
stats
->
nb_cycles
,
10
,
user_space_time
,
kernel_space_time
);
}
}
...
...
packet-exchange/src/server.c
View file @
db791847
...
...
@@ -238,10 +238,8 @@ int main(int argc, char *argv[]) {
int64_t
user_space_time
=
stats
->
packet_info
.
userspace_exit_ts
-
stats
->
packet_info
.
userspace_enter_ts
;
int64_t
kernel_space_time
=
stats
->
packet_info
.
kernelspace_ts
-
stats
->
packet_info
.
userspace_exit_ts
;
printf
(
"(%d) User space time: %"
PRIi64
"
\n
"
,
stats
->
nb_cycles
,
user_space_time
);
printf
(
"(%d) Kernel space time: %"
PRIi64
"
\n
"
,
stats
->
nb_cycles
,
kernel_space_time
);
printf
(
"(%d) User and kernel space time: %*"
PRIi64
", %"
PRIi64
"
\n
"
,
stats
->
packets_received
,
10
,
user_space_time
,
kernel_space_time
);
}
}
}
...
...
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