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
@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