- final Random generator = new Random(19580427 + size);
- long ts = (monotonic && odd) ? -1 : 0;
- for (int i = 0; i < size; i++) {
- ts += monotonic ? 2 : generator.nextInt(10);
- final int sourceIndex = i % NB_SOURCES;
- final int typeIndex = i % NB_TYPES;
- out.writeLong(ts); // Timestamp
- out.writeUTF("Source-" + sourceIndex); // Source
- out.writeUTF("Type-" + typeIndex); // Type
- out.writeInt(i + 1); // Reference (event #)
- for (int j = 0; j < typeIndex; j++) {
- out.writeUTF("Field-" + sourceIndex + "-" + j);
+ final Random generator = new Random(19580427 + size);
+ long ts = (monotonic && odd) ? -1 : 0;
+ for (int i = 0; i < size; i++) {
+ ts += monotonic ? 2 : generator.nextInt(10);
+ final int sourceIndex = i % NB_SOURCES;
+ final int typeIndex = i % NB_TYPES;
+ out.writeLong(ts); // Timestamp
+ out.writeUTF("Source-" + sourceIndex); // Source
+ out.writeUTF("Type-" + typeIndex); // Type
+ out.writeInt(i + 1); // Reference (event #)
+ for (int j = 0; j < typeIndex; j++) {
+ out.writeUTF("Field-" + sourceIndex + "-" + j);
+ }