Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
562a94ca
Commit
562a94ca
authored
May 30, 2017
by
Jens Korinth
Browse files
benchmark: reduce InterruptLatency load
parent
e2bced6b
Changes
1
Show whitespace changes
Inline
Side-by-side
arch/tests/InterruptLatency.hpp
View file @
562a94ca
...
...
@@ -43,7 +43,7 @@ public:
static
constexpr
long
OP_COPYFROM
=
1
;
static
constexpr
long
OP_COPYTO
=
2
;
double
operator
()(
size_t
const
runtime_usecs
)
{
/*
double operator()(size_t const runtime_usecs) {
CumulativeAverage<double> cavg { 0 };
uint32_t clock_cycles = runtime_usecs * 100; // assuming 100Mhz clock
bool stop = false;
...
...
@@ -67,7 +67,7 @@ public:
move(y+1, 0);
endwin();
return cavg();
}
}
*/
double
atcycles
(
uint32_t
const
clock_cycles
,
size_t
const
min_runs
=
100
,
double
*
min
=
NULL
,
double
*
max
=
NULL
)
{
CumulativeAverage
<
double
>
cavg
{
0
};
...
...
@@ -83,8 +83,8 @@ public:
mvprintw
(
y
,
x
,
"Runtime: %12zu cc, Latency: % 12.1f, Min: % 12.1f, Max: % 12.1f, Count: %zu/%zu"
,
clock_cycles
,
cavg
(),
cavg
.
min
(),
cavg
.
max
(),
cavg
.
size
(),
min_runs
);
refresh
();
usleep
(
1000
);
}
while
(
getch
()
==
ERR
&&
(
fabs
(
cavg
.
delta
())
>
0.
0
01
||
cavg
.
size
()
<
min_runs
));
usleep
(
1000
000
);
}
while
(
getch
()
==
ERR
&&
(
fabs
(
cavg
.
delta
())
>
0.01
||
cavg
.
size
()
<
min_runs
));
stop
=
true
;
f
.
get
();
...
...
Jens Korinth
@jk
mentioned in commit
a831b501
·
Jul 14, 2017
mentioned in commit
a831b501
mentioned in commit a831b5015df6bd8f8d23ddd334a3b1159392de92
Toggle commit list
Write
Preview
Supports
Markdown
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