+# params are: record_perf_data(metric, unit, value, description)
+function record_perf_data() {
+ local METRIC=$1
+ local UNIT=$2
+ local DATA=$3
+ local DESCRIPTION=$4
+ echo "{ \"version\" : \"1.0\", \"measurements\" : {\"$METRIC\": {\"description\" : \"$DESCRIPTION\", \"names\":[\"$METRIC\"], \"units\" : [\"$UNIT\"], \"data\" : [$DATA] }}}"
+}
+
+PERFDATA_DIR=$BATS_TMP_DIR
+if [ "${PERFDATA_DIR}" == "" ]; then
+ PERFDATA_DIR=/tmp/
+fi
+