Created
September 14, 2016 13:56
-
-
Save barmintor/85ca8158e98220c689a967075a2809af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASE=http://localhost:8080/$RANDOM | |
COL=$BASE/memberCollection | |
curl -X PUT -H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" $BASE && echo | |
curl -X PUT -H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" $BASE/objects && echo | |
# create a collection | |
curl -X PUT -H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" $COL && echo | |
# create indirect container for members | |
curl -X PUT -H "Content-Type: text/turtle" -H "Link: <http://www.w3.org/ns/ldp#IndirectContainer>; rel=\"type\"" -d " | |
@prefix ore: <http://www.openarchives.org/ore/terms/> . | |
@prefix ldp: <http://www.w3.org/ns/ldp#> . | |
@prefix pcdm: <http://pcdm.org/models#> . | |
<> a ldp:IndirectContainer ; | |
ldp:hasMemberRelation pcdm:hasMember ; | |
ldp:insertedContentRelation ore:proxyFor ; | |
ldp:membershipResource <$COL> ." $COL/members && echo | |
N=0 | |
MAX=10000 | |
while [ $N -lt $MAX ]; do | |
# create an object | |
OBJ=`curl -s -D - -X POST -H "Content-Type: text/turtle" -d " | |
@prefix dc: <http://purl.org/dc/elements/1.1/> . | |
<> dc:title \"this is object # $N\" ." $BASE/objects | grep Location: | tr -s ' ' | cut -d ' ' -f 2` | |
OBJ=${OBJ%$'\n'} | |
OBJ=${OBJ%$'\r'} | |
# add membership proxy | |
MEM=`curl -s -D - -X POST -H "Content-type: text/turtle" -d " | |
@prefix ore: <http://www.openarchives.org/ore/terms/> . | |
<> a ore:Proxy ; | |
ore:proxyFor <$OBJ> ; | |
ore:proxyIn <$COL> ." $COL/members | grep Location | tr -s ' ' | cut -d ' ' -f 2` | |
MEM=${MEM%$'\n'} | |
MEM=${MEM%$'\r'} | |
N=$(( $N + 1 )) | |
if [ $(( $N % 500 )) == 0 ]; then | |
echo $N objects | |
fi | |
done | |
echo retrieving $COL | |
time -p curl -H "Accept: application/n-triples" $COL > 10k-members.nt | |
grep -c hasMember 10k-members.nt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-bash3.2 : rwp/10k-members.sh | |
500 objects | |
1000 objects | |
1500 objects | |
2000 objects | |
2500 objects | |
3000 objects | |
3500 objects | |
4000 objects | |
4500 objects | |
5000 objects | |
5500 objects | |
6000 objects | |
6500 objects | |
7000 objects | |
7500 objects | |
8000 objects | |
8500 objects | |
9000 objects | |
9500 objects | |
10000 objects | |
retrieving http://localhost:8080/8744/memberCollection | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1335k 0 1335k 0 0 2770k 0 --:--:-- --:--:-- --:--:-- 2770k | |
real 0.48 | |
user 0.00 | |
sys 0.00 | |
9984 | |
-bash3.2 : rwp/10k-members.sh | |
500 objects | |
1000 objects | |
1500 objects | |
2000 objects | |
2500 objects | |
3000 objects | |
3500 objects | |
4000 objects | |
4500 objects | |
5000 objects | |
5500 objects | |
6000 objects | |
6500 objects | |
7000 objects | |
7500 objects | |
8000 objects | |
8500 objects | |
9000 objects | |
9500 objects | |
10000 objects | |
retrieving http://localhost:8080/9750/memberCollection | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1335k 0 1335k 0 0 2898k 0 --:--:-- --:--:-- --:--:-- 2902k | |
real 0.46 | |
user 0.00 | |
sys 0.00 | |
9982 | |
-bash3.2 : rwp/rerun.sh | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1335k 0 1335k 0 0 7748k 0 --:--:-- --:--:-- --:--:-- 7718k | |
real 0.18 | |
user 0.00 | |
sys 0.00 | |
9982 | |
-bash3.2 : rwp/rerun.sh | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1335k 0 1335k 0 0 10.3M 0 --:--:-- --:--:-- --:--:-- 10.3M | |
real 0.13 | |
user 0.00 | |
sys 0.00 | |
9982 | |
# DISABLING SMALL SLOT OPTIMIZATION | |
-bash3.2 : rwp/10k-members.sh | |
500 objects | |
1000 objects | |
1500 objects | |
2000 objects | |
2500 objects | |
3000 objects | |
3500 objects | |
4000 objects | |
4500 objects | |
5000 objects | |
5500 objects | |
6000 objects | |
6500 objects | |
7000 objects | |
7500 objects | |
8000 objects | |
8500 objects | |
9000 objects | |
9500 objects | |
10000 objects | |
retrieving http://localhost:8080/3315/memberCollection | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1337k 0 1337k 0 0 2690k 0 --:--:-- --:--:-- --:--:-- 2696k | |
real 0.50 | |
user 0.00 | |
sys 0.00 | |
10000 | |
-bash3.2 : rwp/10k-members.sh | |
500 objects | |
1000 objects | |
1500 objects | |
2000 objects | |
2500 objects | |
3000 objects | |
3500 objects | |
4000 objects | |
4500 objects | |
5000 objects | |
5500 objects | |
6000 objects | |
6500 objects | |
7000 objects | |
7500 objects | |
8000 objects | |
8500 objects | |
9000 objects | |
9500 objects | |
10000 objects | |
retrieving http://localhost:8080/6254/memberCollection | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1337k 0 1337k 0 0 6167k 0 --:--:-- --:--:-- --:--:-- 6163k | |
real 0.22 | |
user 0.00 | |
sys 0.00 | |
10000 | |
-bash3.2 : rwp/rerun.sh | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1337k 0 1337k 0 0 9837k 0 --:--:-- --:--:-- --:--:-- 9907k | |
real 0.14 | |
user 0.00 | |
sys 0.00 | |
10000 | |
-bash3.2 : rwp/rerun.sh | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1337k 0 1337k 0 0 10.3M 0 --:--:-- --:--:-- --:--:-- 10.3M | |
real 0.13 | |
user 0.00 | |
sys 0.00 | |
10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# running from cavendish-jetty | |
rm *.jnl | |
JETTY_HOME=file:`pwd`/src/main/webapp | |
BG_CONFIG=`pwd`/src/main/webapp/WEB-INF/RWStore.properties | |
JETTY_XML=`pwd`/src/main/resources/jetty.xml | |
mvn exec:java -Djetty.home=$JETTY_HOME -Dbigdata.propertyFile=$BG_CONFIG -DjettyXml=$JETTY_XML |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment