Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
timeout.c
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
Kirill Smelkov
timeout.c
Commits
efd656d6
Commit
efd656d6
authored
Jan 10, 2014
by
william
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass along verboseness setting to benchmark implementations
parent
c06dcf95
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
5 deletions
+9
-5
Makefile
Makefile
+1
-1
bench-heap.c
bench-heap.c
+1
-1
bench-wheel.c
bench-wheel.c
+5
-1
bench.c
bench.c
+1
-1
bench.h
bench.h
+1
-1
No files found.
Makefile
View file @
efd656d6
...
...
@@ -4,7 +4,7 @@ WHEEL_BIT = 6
WHEEL_NUM
=
4
CPPFLAGS
=
-DTIMEOUT_DEBUG
CFLAGS
=
-O2
-g
-Wall
-Wextra
CFLAGS
=
-O2
-g
-Wall
-Wextra
-Wno-unused-parameter
timeout
:
CPPFLAGS+=-DWHEEL_BIT=$(WHEEL_BIT) -DWHEEL_NUM=$(WHEEL_NUM)
...
...
bench-heap.c
View file @
efd656d6
...
...
@@ -158,7 +158,7 @@ void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct timeout* e)
static
timeout_t
curtime
;
static
min_heap_t
timeouts
;
static
void
init
(
struct
timeout
*
timeout
,
size_t
count
)
{
static
void
init
(
struct
timeout
*
timeout
,
size_t
count
,
int
verbose
)
{
size_t
i
;
min_heap_ctor
(
&
timeouts
);
...
...
bench-wheel.c
View file @
efd656d6
...
...
@@ -5,7 +5,7 @@
static
struct
timeouts
timeouts
;
static
void
init
(
struct
timeout
*
timeout
,
size_t
count
)
{
static
void
init
(
struct
timeout
*
timeout
,
size_t
count
,
int
verbose
)
{
size_t
i
;
timeouts_init
(
&
timeouts
,
TIMEOUT_mHZ
);
...
...
@@ -13,6 +13,10 @@ static void init(struct timeout *timeout, size_t count) {
for
(
i
=
0
;
i
<
count
;
i
++
)
{
timeout_init
(
&
timeout
[
i
],
0
);
}
#if TIMEOUT_DEBUG - 0
timeout_debug
=
verbose
;
#endif
}
/* init() */
...
...
bench.c
View file @
efd656d6
...
...
@@ -203,7 +203,7 @@ int main(int argc, char **argv) {
errx
(
1
,
"%s: %s"
,
MAIN
.
path
,
dlerror
());
MAIN
.
vops
=
*
vops
;
MAIN
.
vops
.
init
(
MAIN
.
timeout
,
MAIN
.
count
);
MAIN
.
vops
.
init
(
MAIN
.
timeout
,
MAIN
.
count
,
MAIN
.
verbose
);
while
(
fgets
(
cmd
,
sizeof
cmd
,
stdin
)
&&
parseop
(
&
op
,
cmd
))
{
struct
timeout
*
to
;
...
...
bench.h
View file @
efd656d6
...
...
@@ -43,7 +43,7 @@ struct op *parseop(struct op *, char *ln);
struct
vops
{
void
(
*
init
)(
struct
timeout
*
,
size_t
);
void
(
*
init
)(
struct
timeout
*
,
size_t
,
int
);
void
(
*
add
)(
struct
timeout
*
,
timeout_t
);
void
(
*
del
)(
struct
timeout
*
);
struct
timeout
*
(
*
get
)(
void
);
...
...
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