Skip to content

Instantly share code, notes, and snippets.

@meysampg
Created November 11, 2017 16:53
Show Gist options
  • Save meysampg/b5386b7ca101e99d076824770d6c5c2a to your computer and use it in GitHub Desktop.
Save meysampg/b5386b7ca101e99d076824770d6c5c2a to your computer and use it in GitHub Desktop.
Fake data for test Influx performance
n=100000
for i in {1..$n}
do
s1=$(echo -n "`date +%N`" | sha256sum | sed 's/\s\-//' | head -c 15)
s2=$(echo -n "`date +%N`" | sha256sum | sed 's/\s\-//' | head -c 5)
s3=$(echo -n "`date +%N`" | sha256sum | sed 's/\s\-//' | head -c 60)
s4=$(echo -n "`date +%N`" | sha256sum | sed 's/\s\-//' | head -c 60)
s5=$(echo -n "`date +%N`" | sha256sum | sed 's/\s\-//' | head -c 10)
s6=$(echo -n "`date +%N`" | sha256sum | sed 's/\s\-//' | head -c 20)
query=profile,name=\"$s1\",code=\"$s2\",content=\"$s3\"" "profile_id=\"$s4\",page_id=\"$s5\",eng=\"$s6\"
curl -XPOST 'http://localhost:8086/write?db=first' --data-binary $query
echo "$i: $query"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment