implement parallel collecting. add keen_io reporter. several fixes

This commit is contained in:
Patrick Stadler
2015-03-12 20:59:09 +01:00
parent 5c65c6646f
commit 88318c64c4
6 changed files with 73 additions and 19 deletions

View File

@@ -73,17 +73,22 @@ main_collect () {
}
# collect metrics
while true; do
for metric in ${__METRICS[@]}; do
if ! is_function __m_${metric}_collect; then
continue
fi
for metric in ${__METRICS[@]}; do
if ! is_function __m_${metric}_collect; then
continue
fi
fork () {
__m_${metric}_collect
done
sleep $INTERVAL
sleep $INTERVAL
fork
}
fork &
unset -f fork
done
# run forever
tail -f /dev/null # `sleep infinity` is not portable
}
main_terminate () {