When I have to find bottleneck in my Java application I usually use JFR for this task.
For this case I create custom event class like this
@Name(PaymentConfirmEvent.NAME)
@Label("Payment confirm Invocation")
@Category("Payment events")
@Description("Invocation of methods during payment confirmation")
@StackTrace(false)
public class PaymentConfirmEvent extends Event {
@Label("Method name")
public String method;
@Label("Operation id")
public String operationId;
@Label("Exception info")
public String exceptionInfo;
}
Spread this events in my code like this
PaymentConfirmEvent event = jfrEventService.registerNewEvent();
WorkResult<AcquiringForm> res = paymentControllerService.paymentConfirm(cardData, partnerId, orderId, sign);
jfrEventService.commitEvent(event, "paymentControllerService.paymentConfirm", orderId);
Next, using special tool like JFR recorder I can find places in my code which perform longer then expected.
This tool has very low footprint on performance and it can be used in production.
Is there something like this in rust ecosystem?
1