private void runThroughputTest(String query, int stringSize, int expectedRecordCount)
throws IOException, InterruptedException {
long initTimestamp = System.currentTimeMillis();
MemStreamBuilder streamBuilder = new MemStreamBuilder(STREAM_NAME);
long bytesSent = 0;
StringBuilder sbStringCol = new StringBuilder();
for (int i = 0; i < stringSize; i++) {
sbStringCol.append("a");
}
String stringCol = sbStringCol.toString();
streamBuilder.addField(new TypedField("a", Type.getPrimitive(Type.TypeName.INT)));
streamBuilder.addField(new TypedField("b", Type.getNullable(Type.TypeName.INT)));
streamBuilder.addField(new TypedField("c", Type.getNullable(Type.TypeName.STRING)));
for (int i = 0; i < NUM_RECORDS; i++) {
StringBuilder sb = new StringBuilder();
sb.append(i);
sb.append(",");
int j = 10 * i;
sb.append(j);
sb.append(",");
sb.append(stringCol);
String eventText = sb.toString();
streamBuilder.addEvent(eventText);
bytesSent += eventText.length();
}
StreamSymbol stream = streamBuilder.build();
getSymbolTable().addSymbol(stream);
getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "testThroughput");
// With all configuration complete, connect to the environment.