@KPITimedEvent(value = "Baseline.service.testLargeGet", catchFailures = true)
@Override
public LargeRequest testLargeGet(RequestContext ctx, Integer size, TimeConstraints timeConstraints) throws SimpleException {
ctx.trace("Starting large get for array of size %d", size);
ctx.setRequestLogExtension(new BaselineLogExtension(size, null, null));
LargeRequest result = new LargeRequest();
result.setObjects(new ArrayList<ComplexObject>());
result.setSize(size);
result.setOddOrEven(size % 2 == 0 ? LargeRequestOddOrEvenEnum.EVEN : LargeRequestOddOrEvenEnum.ODD);
for (int i = 0; i < size; i++) {
ComplexObject o = new ComplexObject();
o.setName("name " + i);
o.setValue1(i);
o.setValue2(i + 1);
result.getObjects().add(o);
}
return result;
}