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
7c106519
Commit
7c106519
authored
Apr 23, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove IO during measurements
parent
d9ef8c97
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
11 deletions
+18
-11
latency-measure/src/main.c
latency-measure/src/main.c
+18
-11
simple-client/build/main_arm
simple-client/build/main_arm
+0
-0
No files found.
latency-measure/src/main.c
View file @
7c106519
...
@@ -93,6 +93,8 @@ static void *timerthread(void *p) {
...
@@ -93,6 +93,8 @@ static void *timerthread(void *p) {
next
=
add_ns
(
current
,
param
->
interval
);
next
=
add_ns
(
current
,
param
->
interval
);
}
}
printf
(
"Done
\n
"
);
return
NULL
;
return
NULL
;
}
}
...
@@ -134,7 +136,7 @@ int main(int argc, char *argv[]) {
...
@@ -134,7 +136,7 @@ int main(int argc, char *argv[]) {
main_param_t
main_param
;
main_param_t
main_param
;
// Default values
// Default values
param
.
interval
=
NSECS_PER_SECOND
;
param
.
interval
=
1000000
;
param
.
max_cycles
=
100
;
param
.
max_cycles
=
100
;
param
.
priority
=
80
;
param
.
priority
=
80
;
...
@@ -142,21 +144,26 @@ int main(int argc, char *argv[]) {
...
@@ -142,21 +144,26 @@ int main(int argc, char *argv[]) {
process_options
(
argc
,
argv
,
&
param
,
&
main_param
);
process_options
(
argc
,
argv
,
&
param
,
&
main_param
);
int
err
=
sleep
(
3
);
pthread_create
(
&
thread
,
NULL
,
timerthread
,
(
void
*
)
&
param
);
if
(
err
)
pthread_create
(
&
thread
,
NULL
,
timerthread
,
(
void
*
)
&
param
);
error
(
EXIT_FAILURE
,
errno
,
"Couldn't create thread"
);
for
(;;)
{
sleep
(
10
);
usleep
(
main_param
.
refresh_rate
);
printf
(
"Maximum latency: %"
PRIi64
"us (%d)
\n
"
,
(
param
.
stat
.
max_diff
/
1000
),
param
.
stat
.
nb_cycles
);
printf
(
"Maximum latency: %"
PRIi64
"us (%d)
\n
"
,
(
param
.
stat
.
max_diff
/
1000
),
param
.
stat
.
nb_cycles
);
//if(err)
// error(EXIT_FAILURE, errno, "Couldn't create thread");
if
(
param
.
max_cycles
==
param
.
stat
.
nb_cycles
)
//for (;;) {
break
;
}
// usleep(main_param.refresh_rate);
// printf("Maximum latency: %" PRIi64 "us (%d)\n", (param.stat.max_diff / 1000), param.stat.nb_cycles);
// if( param.max_cycles == param.stat.nb_cycles )
// break;
//}
exit
(
EXIT_SUCCESS
);
exit
(
EXIT_SUCCESS
);
}
}
simple-client/build/main_arm
View file @
7c106519
No preview for this file type
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