in type-safe/src/benchmarks/java/software/amazon/swage/collection/TypedMapBenchmarks.java [108:129]
public void benchmarkListTypedMap(AppState appState, ContextState ctxState)
{
TypedMap data;
if (appState.numDataEntries == 0) {
data = TypedMap.empty();
} else {
final ListTypedMap.Builder builder = ListTypedMap.Builder
.with(appState.dataKeys.get(0), ctxState.datas.get(0));
IntStream.range(1, appState.numDataEntries).forEach(
i -> {
builder.add(appState.dataKeys.get(i), ctxState.datas.get(i));
}
);
data = builder.build();
}
IntStream.range(0, ctxState.numRecordings).forEach(
i -> {
appState.sink.useData(data);
}
);
}