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
d8c99625
Commit
d8c99625
authored
Apr 30, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
1d1b8e4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
clock-res/src/clockres.c
clock-res/src/clockres.c
+12
-3
No files found.
clock-res/src/clockres.c
View file @
d8c99625
...
...
@@ -47,6 +47,7 @@ static void *timerthread(void *p) {
struct
timespec
previous
,
current
;
struct
sched_param
priority
;
uint64_t
diff
;
char
time_measured_string
[
255
];
thread_param_t
*
param
=
(
thread_param_t
*
)
p
;
thread_stat_t
*
stat
=
&
param
->
stat
;
...
...
@@ -72,15 +73,23 @@ static void *timerthread(void *p) {
clock_gettime
(
CLOCK_ID
,
&
current
);
if
(
param
->
enable_tracing
)
tracemark
(
"Time measure end
\n
"
);
tracemark
(
"Time measure end"
);
diff
=
calcdiff_ns
(
current
,
previous
);
sprintf
(
time_measured_string
,
"Diff measured: %"
PRIu64
"
\n
"
,
diff
);
if
(
param
->
enable_tracing
)
tracemark
(
time_measured_string
);
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
);
if
(
param
->
enable_tracing
&&
(
diff
>
param
->
latency_threshold
)
)
break
;
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