eclipse-vertx / vertx-tracing

Vertx integration with tracing libraries
Other
42 stars 34 forks source link

Use executeBlocking to execute blocking method asynchronously #60

Closed Arooba-git closed 1 year ago

Arooba-git commented 1 year ago

Hi! :) Apparently the code inside deployVerticle callback is blocking.. This PR fixes the blocking calls to keep the pipeline reactive.

Performance (latency) before fix

Screen Shot 2023-07-10 at 10 14 07 AM

Performance after fix

Screen Shot 2023-07-10 at 7 34 26 PM
vietj commented 1 year ago

can you sign the eclipse contributor agreement ?

Arooba-git commented 1 year ago

@vietj Hello! As you can see in the screenshot, I already have :)

Screen Shot 2023-07-10 at 5 38 33 PM Screen Shot 2023-07-10 at 5 41 33 PM
tsegismont commented 1 year ago

I fail to see how the screenshots (annotations on main thread state) relate to the updated test code (callback executed on an event loop thread).

This portion of test code looks harmless so I'm closing the issue.

Arooba-git commented 1 year ago

@tsegismont Hello! The snapshots show that before the fix (with the blocking code), the main thread is being wasted just waiting or in parking state. After the fix, we can see the waiting/parking time reduced and the main thread being utilized usefully (green) :)

tsegismont commented 1 year ago

Hi @Arooba-git

I can see there is a difference between the two screenshots for the main thread. But it is not related to the changed code because it runs on an event loop thread.