Skip to content

Instantly share code, notes, and snippets.

@jerith
Created June 23, 2012 13:13
Show Gist options
  • Save jerith/2978270 to your computer and use it in GitHub Desktop.
Save jerith/2978270 to your computer and use it in GitHub Desktop.
#!/bin/bash
# You may need to replace "jot" with "seq" if you're on Linux instead of OSX.
# Also, you may need to find a replacement for "uuidgen" if you don't have it.
function setprops() {
for i in `jot 10`; do
name="test=`uuidgen`"
curl -v -X PUT -H "Content-Type: application/json" \
-d '{"props":{"n_val":5}}' http://127.0.0.1:8098/riak/$name \
> /dev/null 2>&1
done
}
for j in `jot 10`; do
time (setprops) 2> >(grep real)
done
@jerith
Copy link
Author

jerith commented Jun 23, 2012

Here's the output of two consecutive runs on my dev machine, starting with a fresh four-node riak cluster:

lantea:~ jerith$ ./test_bucket_props.sh 
real    0m0.525s
real    0m0.832s
real    0m1.249s
real    0m1.315s
real    0m1.300s
real    0m1.072s
real    0m1.325s
real    0m2.866s
real    0m3.833s
real    0m3.961s
lantea:~ jerith$ ./test_bucket_props.sh 
real    0m4.360s
real    0m4.727s
real    0m6.160s
real    0m4.784s
real    0m5.613s
real    0m6.763s
real    0m6.520s
real    0m6.368s
real    0m6.572s
real    0m8.858s

@derpston
Copy link

One very weedy dev VM, a single riak node.

real 0m5.929s
real 0m4.785s
real 0m5.327s
real 0m6.812s
real 0m7.702s
real 0m9.699s
real 0m9.341s
real 0m10.275s
real 0m11.703s
real 0m12.132s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment