import javaflow.network.impl.SimpleNetworkBuilder;
public class SpeedTest {
public static void main(String[] args) {
final int messageCount = 10000000;
Network network = new SimpleNetworkBuilder().build(new NetworkDefiner() {{
from(c("generator", Generator.class)).to(c("expectPackets", ExpectPackets.class));
from("generator", "STARTNOTIFY").to("START", c("timer", Timer.class));
from("expectPackets", "ENDNOTIFY").to("END", "timer");
from("timer").to("TIME",c("results", Results.class));
message(messageCount).to("COUNT", "generator");
message(messageCount).to("COUNT", "results");
message(messageCount).to("COUNT", "expectPackets");
}});
network.runInCurrentThread();
}