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
b79ec2ee
Commit
b79ec2ee
authored
9 years ago
by
William Ahern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add gnuplot code
parent
8793dd42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
Makefile
Makefile
+19
-4
bench.plt
bench.plt
+20
-0
No files found.
Makefile
View file @
b79ec2ee
CPPFLAGS
=
-DTIMEOUT_DEBUG
CFLAGS
=
-O2
-march
=
native
-g
-Wall
-Wextra
-Wno-unused-parameter
LUA
=
lua
all
:
bench.so bench-wheel.so bench-heap.so bench-llrb.so
all
:
bench.so bench-wheel.so bench-heap.so bench-llrb.so
WHEEL_BIT
=
6
WHEEL_BIT
=
6
WHEEL_NUM
=
4
WHEEL_NUM
=
4
CPPFLAGS
=
-DTIMEOUT_DEBUG
CFLAGS
=
-O2
-march
=
native
-g
-Wall
-Wextra
-Wno-unused-parameter
timeout
:
CPPFLAGS+=-DWHEEL_BIT=$(WHEEL_BIT) -DWHEEL_NUM=$(WHEEL_NUM)
timeout
:
CPPFLAGS+=-DWHEEL_BIT=$(WHEEL_BIT) -DWHEEL_NUM=$(WHEEL_NUM)
timeout8
:
CPPFLAGS+=-DWHEEL_BIT=3 -DWHEEL_NUM=$(WHEEL_NUM)
timeout8
:
CPPFLAGS+=-DWHEEL_BIT=3 -DWHEEL_NUM=$(WHEEL_NUM)
...
@@ -73,11 +74,25 @@ bench-wheel.so: timeout.c
...
@@ -73,11 +74,25 @@ bench-wheel.so: timeout.c
bench-%.so
:
bench-%.c timeout.h
bench-%.so
:
bench-%.c timeout.h
$(CC)
-o
$@
$<
$(CPPFLAGS)
$(CFLAGS)
-Wno-unused-function
$(SOFLAGS)
$(CC)
-o
$@
$<
$(CPPFLAGS)
$(CFLAGS)
-Wno-unused-function
$(SOFLAGS)
%-add.dat
:
bench-%.so bench-add.lua bench-aux.lua bench.so
$(LUA)
bench-add.lua
$<
>
$@
.tmp
mv
$@
.tmp
$@
%-del.dat
:
bench-%.so bench-del.lua bench-aux.lua bench.so
$(LUA)
bench-del.lua
$<
>
$@
.tmp
mv
$@
.tmp
$@
%-expire.dat
:
bench-%.so bench-expire.lua bench-aux.lua bench.so
$(LUA)
bench-expire.lua
$<
>
$@
.tmp
mv
$@
.tmp
$@
bench.eps
:
bench.plt $(foreach OP
,
add del expire
,
wheel-$(OP).dat heap-$(OP).dat)
gnuplot bench.plt
.PHONY
:
clean clean~
.PHONY
:
clean clean~
clean
:
clean
:
$(RM)
-r
timeout
timeout8 timeout16 timeout32 timeout64
*
.dSYM
*
.so
*
.o
$(RM)
-r
timeout
timeout8 timeout16 timeout32 timeout64
*
.dSYM
*
.so
*
.o
*
.dat
clean~
:
clean
clean~
:
clean
$(RM)
*
~
$(RM)
*
~
This diff is collapsed.
Click to expand it.
bench.plt
0 → 100644
View file @
b79ec2ee
set terminal postscript color
set output "bench.eps"
set key top left
set xlabel "Number of timeouts"
set ylabel "Time\n(microseconds)"
#set logscale x
set title "Time spent installing timeouts" font ",20"
plot 'heap-add.dat' using 1:($2*1000000) title "min-heap" with lines ls 1 lw 3 lc "red", \
'wheel-add.dat' using 1:($2*1000000) title "hierarchical wheel" with lines ls 1 lw 3 lc "forest-green"
set title "Time spent deleting timeouts" font ",20"
plot 'heap-del.dat' using 1:($2*1000000) title "min-heap" with lines ls 1 lw 3 lc "red", \
'wheel-del.dat' using 1:($2*1000000) title "hierarchical wheel" with lines ls 1 lw 3 lc "forest-green"
set title "Time spent expiring timeouts\n(by iteratively updating clock ~1000 times)" font ",20"
plot 'heap-expire.dat' using 1:($2*1000000) title "min-heap" with lines ls 1 lw 3 lc "red", \
'wheel-expire.dat' using 1:($2*1000000) title "hierarchical wheel" with lines ls 1 lw 3 lc "forest-green"
This diff is collapsed.
Click to expand it.
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