Fix: cast caa_cycles_t to unsigned long long
[urcu.git] / tests / benchmark / runhash.sh
CommitLineData
6d56bfa2
MD
1#!/bin/sh
2
3# TODO: missing tests:
4# - send kill signals during tests to change the behavior between
5# add/remove/random
6# - validate that "nr_leaked" is always 0 in SUMMARY for all tests
7
8# 30 seconds per test
9TIME_UNITS=30
10
11TESTPROG=./test_urcu_hash
12
13#thread multiplier
14THREAD_MUL=1
15
16EXTRA_PARAMS=-v
17
18# ** test update coherency with single-value table
19
20# rw test, single key, replace and del randomly, 4 threads, auto resize.
21# key range: init, lookup, and update: 0 to 0
a32d7239 22${TESTPROG} 0 $((4*${THREAD_MUL})) ${TIME_UNITS} -A -s -M 1 -N 1 -O 1 ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
23
24# rw test, single key, add unique and del randomly, 4 threads, auto resize.
25# key range: init, lookup, and update: 0 to 0
a32d7239 26${TESTPROG} 0 $((4*${THREAD_MUL})) ${TIME_UNITS} -A -u -M 1 -N 1 -O 1 ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
27
28# rw test, single key, replace and del randomly, 2 lookup threads, 2 update threads, auto resize.
29# key range: init, lookup, and update: 0 to 0
a32d7239 30${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -s -M 1 -N 1 -O 1 ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
31
32# rw test, single key, add and del randomly, 2 lookup threads, 2 update threads, auto resize.
33# key range: init, lookup, and update: 0 to 0
a32d7239 34${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -M 1 -N 1 -O 1 ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
35
36
37# ** test updates vs lookups with default table
38
39# rw test, 2 lookup, 2 update threads, add and del randomly, auto resize.
40# max 1048576 buckets
41# key range: init, lookup, and update: 0 to 999999
a32d7239 42${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
43
44# rw test, 2 lookup, 2 update threads, add_replace and del randomly, auto resize.
45# max 1048576 buckets
46# key range: init, lookup, and update: 0 to 999999
a32d7239 47${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -s ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
48
49# rw test, 2 lookup, 2 update threads, add_unique and del randomly, auto resize.
50# max 1048576 buckets
51# key range: init, lookup, and update: 0 to 999999
a32d7239 52${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -u ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
53
54
55# test memory management backends
56
57# rw test, 2 lookup, 2 update threads, add only, auto resize.
58# max buckets: 1048576
59# key range: init, lookup, and update: 0 to 99999999
60# mm backend: "order"
61${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -m 1 -n 1048576 -i \
a32d7239 62 -M 100000000 -N 100000000 -O 100000000 -B order ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
63
64# rw test, 2 lookup, 2 update threads, add only, auto resize.
65# max buckets: 1048576
66# key range: init, lookup, and update: 0 to 99999999
67# mm backend: "chunk"
68${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -m 1 -n 1048576 -i \
a32d7239 69 -M 100000000 -N 100000000 -O 100000000 -B chunk ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
70
71# rw test, 2 lookup, 2 update threads, add only, auto resize.
72# max buckets: 1048576
73# key range: init, lookup, and update: 0 to 99999999
74# mm backend: "mmap"
75${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -m 1 -n 1048576 -i \
a32d7239 76 -M 100000000 -N 100000000 -O 100000000 -B mmap ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
77
78
79# ** key range tests
80
81# rw test, 2 lookup, 2 update threads, add and del randomly, auto resize.
82# max 1048576 buckets
83# key range: init, and update: 0 to 999999
84# key range: lookup: 1000000 to 1999999
85# NOTE: reader threads in this test should never have a successful
86# lookup. TODO
87${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
a32d7239 88 -R 1000000 ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
89
90# ** small key range
91
92# rw test, 2 lookup, 2 update threads, add and del randomly, auto resize.
93# max 1048576 buckets
94# key range: init, update, and lookups: 0 to 9
95${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
a32d7239 96 -M 10 -N 10 -O 10 ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
97
98# rw test, 2 lookup, 2 update threads, add_unique and del randomly, auto resize.
99# max 1048576 buckets
100# key range: init, update, and lookups: 0 to 9
101${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
a32d7239 102 -M 10 -N 10 -O 10 -u ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
103
104# rw test, 2 lookup, 2 update threads, add_replace and del randomly, auto resize.
105# max 1048576 buckets
106# key range: init, update, and lookups: 0 to 9
107${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
a32d7239 108 -M 10 -N 10 -O 10 -s ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
109
110# ** lookup for known keys
111
112# rw test, 2 lookup, 2 update threads, add_replace and del randomly, auto resize.
113# max 1048576 buckets
114# lookup range is entirely populated.
115# key range: init, and lookups: 0 to 9
116# key range: updates: 10 to 19
117# NOTE: reader threads in this test should always have successful
118# lookups. TODO
119${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
a32d7239 120 -M 10 -N 10 -O 10 -R 0 -T 0 -S 10 -k 10 -s ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
121
122# ** Uniqueness test
123
124# rw test, 2 lookup, 2 update threads, add_unique, add_replace and del randomly, auto resize.
125# max 1048576 buckets
126# asserts that no duplicates are observed by reader threads
127# standard length hash chains
128${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
a32d7239 129 -U ${EXTRA_PARAMS} || exit 1
6d56bfa2
MD
130
131# rw test, 2 lookup, 2 update threads, add_unique, add_replace and del randomly, auto resize.
132# max 1048576 buckets
133# asserts that no duplicates are observed by reader threads
134# create long hash chains: using modulo 4 on keys as hash
135${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
a32d7239 136 -U -C 4 ${EXTRA_PARAMS} || exit 1
This page took 0.032779 seconds and 4 git commands to generate.