use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.odl.bgp.app.peer.benchmark.rev200120.AddPrefixOutputBuilder in project bgpcep by opendaylight.
the class AppPeerBenchmark method addPrefix.
@Override
public ListenableFuture<RpcResult<AddPrefixOutput>> addPrefix(final AddPrefixInput input) {
final long duration = addRoute(input.getPrefix(), input.getNexthop(), input.getCount(), input.getBatchsize());
final long rate = countRate(duration, input.getCount());
final AddPrefixOutputBuilder outputbuilder = new AddPrefixOutputBuilder();
outputbuilder.setResult(createResult(input.getCount(), duration, rate));
final AddPrefixOutput output = outputbuilder.build();
return RpcResultBuilder.success(output).buildFuture();
}
Aggregations