in orderbook-benchmark/src/jmh/java/com/epam/deltix/orderbook/benchmark/AbstractOrderBookBenchmarkAll.java [36:61]
void initUpdateMarketData(final int maxDepth,
final int numberOfExchange) {
for (int exchangeId = 0; exchangeId < numberOfExchange; exchangeId++) {
for (int level = 0; level < maxDepth; ++level) {
final L2EntryUpdate entryUpdate = new L2EntryUpdate();
entryUpdate.setPrice(Decimal64Utils.fromDouble(maxDepth + level));
entryUpdate.setSize(Decimal64Utils.fromDouble(10));
entryUpdate.setLevel((short) level);
entryUpdate.setSide(QuoteSide.ASK);
entryUpdate.setExchangeId(exchangeId);
entryUpdate.setAction(BookUpdateAction.UPDATE);
updateOffers.add(entryUpdate);
}
for (int level = 0; level < maxDepth; ++level) {
final L2EntryUpdate entryUpdate = new L2EntryUpdate();
entryUpdate.setPrice(Decimal64Utils.fromDouble(maxDepth - level));
entryUpdate.setSize(Decimal64Utils.fromDouble(10));
entryUpdate.setLevel((short) level);
entryUpdate.setSide(QuoteSide.BID);
entryUpdate.setExchangeId(exchangeId);
entryUpdate.setAction(BookUpdateAction.UPDATE);
updateBids.add(entryUpdate);
}
}
}