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
059bcc69
Commit
059bcc69
authored
Apr 30, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
cd3e853f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
clock-res/src/clockres.c
clock-res/src/clockres.c
+9
-14
No files found.
clock-res/src/clockres.c
View file @
059bcc69
...
...
@@ -65,31 +65,26 @@ static void *timerthread(void *p) {
for
(
stat
->
nb_cycles
=
0
;;
stat
->
nb_cycles
++
)
{
if
(
param
->
max_cycles
&&
(
stat
->
nb_cycles
>=
param
->
max_cycles
))
break
;
if
(
param
->
enable_tracing
)
tracemark
(
"Time measure start
\n
"
);
clock_gettime
(
CLOCK_ID
,
&
previous
);
clock_gettime
(
CLOCK_ID
,
&
current
);
if
(
param
->
enable_tracing
)
tracemark
(
"Time measure end"
);
diff
=
calcdiff_ns
(
current
,
previous
);
sprintf
(
time_measured_string
,
"Diff measured: %"
PRIu64
", Current (%ld, %ld), Previous (%ld, %ld)
\n
"
,
diff
,
current
.
tv_sec
,
current
.
tv_nsec
,
previous
.
tv_sec
,
previous
.
tv_nsec
);
if
(
param
->
enable_tracing
&&
(
diff
>
param
->
latency_threshold
))
{
if
(
param
->
enable_tracing
)
tracemark
(
time_measured_string
);
sprintf
(
time_measured_string
,
"Diff measured: %"
PRIu64
"
\n
"
,
diff
);
tracemark
(
time_measured_string
);
tracing
(
0
);
stat
->
max_res
=
max
(
stat
->
max_res
,
diff
);
stat
->
min_res
=
min
(
stat
->
min_res
,
diff
);
stat
->
max_res
=
max
(
stat
->
max_res
,
diff
);
stat
->
min_res
=
min
(
stat
->
min_res
,
diff
);
if
(
param
->
enable_tracing
&&
(
diff
>
param
->
latency_threshold
))
{
tracing
(
0
);
break
;
}
stat
->
max_res
=
max
(
stat
->
max_res
,
diff
);
stat
->
min_res
=
min
(
stat
->
min_res
,
diff
);
usleep
(
param
->
interval
);
}
...
...
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