Skip to content

Commit

Permalink
Merge branch 'master' into put-futures
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhoo committed Mar 8, 2017
2 parents b7abc6e + c04e67f commit 6adf44d
Show file tree
Hide file tree
Showing 22 changed files with 989 additions and 157 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ default = ["web", "b_netsoup"]
profiling = ["timekeeper/default"]

[dependencies]
chrono = "0.3.0"
itertools = "0.5"
petgraph = "0.4"
regex = "0.1"
Expand Down Expand Up @@ -100,3 +101,7 @@ path = "benchmarks/vote/vote.rs"
[[bin]]
name = "multitail"
path = "benchmarks/multitail/multitail.rs"

[[bin]]
name = "tpc_w"
path = "benchmarks/tpc_w/tpc_w.rs"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distributary: a data-flow based database with automatic materialization

[![Build Status](https://travis-ci.com/mit-pdos/distributary.svg?token=BSd4zXamztCMoDZRewoH&branch=master)](https://travis-ci.com/mit-pdos/distributary)
[![Build Status](https://travis-ci.org/mit-pdos/distributary.svg?branch=master)](https://travis-ci.org/mit-pdos/distributary)

This repository provides an implementation of the data storage system
model proposed in [Soup](https://pdos.csail.mit.edu/projects/soup.html).
Expand Down
45 changes: 45 additions & 0 deletions benchmarks/tpc_w/generate_prepopulation_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
URL="http://jmob.ow2.org/tpcw/generate.tar.gz"

# default scale factor is 10000
SF_ITEMS=10000
SF_BROWSERS=10000

if [[ $# > 1 ]]; then
SF_ITEMS=$1
SF_BROWSERS=$2
fi

mkdir -p ${DIR}/generate
mkdir -p ${DIR}/data

# download
wget ${URL} -O ${DIR}/generate.tar.gz
cd ${DIR}
tar -xzf generate.tar.gz
cd ${DIR}/generate

# patch & build generator
echo "char *getRandString(char *str, int l, int h);" >> tpcw-spec.h
make clean && make all

CUST=$(expr ${SF_BROWSERS} \* 288)
# generate tables
echo "Generating countries..."
./tpcw -t country > ../data/countries.tsv
echo "Generating authors..."
# authors = 0.25 * ITEM, and for weird reasons must be at least 12
SF_ITEMS_ROUNDED=$(python -c "from math import ceil; print max(12, int(ceil(${SF_ITEMS}*0.25)))")
./tpcw -t author -i ${SF_ITEMS_ROUNDED} > ../data/authors.tsv
echo "Generating customers..."
./tpcw -t customer -c ${CUST} > ../data/customers.tsv
echo "Generating addresses..."
./tpcw -t address -c ${CUST} > ../data/addresses.tsv
echo "Generating orders..."
./tpcw -t orders -c ${CUST} -p ../data > ../data/orders.tsv
echo "Generating items..."
./tpcw -t item -i ${SF_ITEMS} > ../data/items.tsv

# back to old workdir
cd -
Loading

0 comments on commit 6adf44d

Please sign in to comment.