#!/bin/sh

# Run a short topictest to warm up the broker and iron out startup effects.
flush() {
    topic_listener >/dev/null 2>&1 &
    topic_publisher >/dev/null 2>&1 
}

echo Java broker
broker j ; flush
topictest c | tail -n1
topictest c | tail -n1
topictest c | tail -n1

echo C++ broker
broker c ; flush
topictest c | tail -n1
topictest c | tail -n1
topictest c | tail -n1

# Don't bother with java clients we know they're slower.

