diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2016-09-27 02:40:47 -0400 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-09-27 16:40:47 +1000 |
commit | 668be0413df83942075dceee6c3e023f1ebdad46 (patch) | |
tree | cfc58543122618fe071a41fc021ee5976bbedf8c /dist | |
parent | 5fb852354745b9efe638183084ee00db821aa132 (diff) | |
download | mongo-668be0413df83942075dceee6c3e023f1ebdad46.tar.gz |
WT-2917 split wtperf's configuration into per-database and per-run parts (#3006)
Diffstat (limited to 'dist')
-rwxr-xr-x | dist/s_docs | 11 | ||||
-rwxr-xr-x | dist/s_style | 2 | ||||
-rw-r--r-- | dist/wtperf_config.py | 25 |
3 files changed, 32 insertions, 6 deletions
diff --git a/dist/s_docs b/dist/s_docs index e2b1d2aed11..e78ecb1dabb 100755 --- a/dist/s_docs +++ b/dist/s_docs @@ -1,7 +1,7 @@ #! /bin/sh t=__wt.$$ -trap 'rm -f $t /tmp/__doxy' 0 1 2 3 13 15 +trap 'rm -f $t' 0 1 2 3 13 15 # Skip this when building release packages: docs are built separately test -n "$WT_RELEASE_BUILD" && exit 0 @@ -30,18 +30,19 @@ wtperf_config() { # The Linux ed command writes line numbers to stderr, redirect both # stdout and stderr to keep things quiet. - cc -o /tmp/__doxy ../bench/wtperf/doxy.c && + cat ../bench/wtperf/wtperf_opt.i | + cpp -DOPT_DEFINE_DOXYGEN | + python wtperf_config.py > $t (echo '/START_AUTO_GENERATED_WTPERF_CONFIGURATION/+3,/STOP_AUTO_GENERATED_WTPERF_CONFIGURATION/-1d' echo 'i' echo '' echo '.' - echo ".r !/tmp/__doxy" + echo ".r $t" echo 'a' echo '' echo '.' echo 'w' - echo 'q') | ed ../src/docs/wtperf.dox 1>/dev/null 2>/dev/null && - rm -f /tmp/__doxy + echo 'q') | ed ../src/docs/wtperf.dox 1>/dev/null 2>/dev/null } structurechk() diff --git a/dist/s_style b/dist/s_style index 3860a23b991..8e755224ee2 100755 --- a/dist/s_style +++ b/dist/s_style @@ -108,7 +108,7 @@ else ! expr "$f" : 'test/.*' > /dev/null && ! expr "$f" : '.*/utilities/.*' > /dev/null; then if ! expr "$f" : '.*/os_alloc.c' > /dev/null && - egrep '[[:space:]]free[(]|[[:space:]]strdup[(]|[[:space:]]strndup[(]|[[:space:]]malloc[(]|[[:space:]]calloc[(]|[[:space:]]realloc[(]' $f > $t; then + egrep '[[:space:]]free[(]|[[:space:]]strdup[(]|[[:space:]]strndup[(]|[[:space:]]malloc[(]|[[:space:]]calloc[(]|[[:space:]]realloc[(]|[[:space:]]sprintf[(]' $f > $t; then test -s $t && { echo "$f: call to illegal function" cat $t diff --git a/dist/wtperf_config.py b/dist/wtperf_config.py new file mode 100644 index 00000000000..72256ed5527 --- /dev/null +++ b/dist/wtperf_config.py @@ -0,0 +1,25 @@ +# Output a doxgen version of the wtperf configuration options. +import string, sys + +for line in sys.stdin: + if not line.startswith('OPTION '): + continue + + line = line.replace('OPTION ', '') + v = line.split('",') + v[0] = v[0].replace('"', '').strip() + v[1] = v[1].replace('"', '').strip() + v[2] = v[2].replace('"', '').strip() + v[3] = v[3].replace('"', '').strip() + + if v[3] == 'boolean': + if v[2] == '0': + d = 'false' + else: + d = 'true' + elif v[3] == 'string': + d = '"' + v[2] + '"' + else: + d = v[2] + print '@par ' + v[0] + ' (' + v[3] + ', default=' + d + ')' + print v[1] |