Skip to content

Threadly Features, Debugging Utilities

Mike Jensen edited this page Oct 3, 2018 · 3 revisions

Return to the top level features page here: https://github.com/threadly/threadly/wiki/Threadly-Features

Debugging utilities

  • CancelDebuggingListenableFuture

This ListenableFuture wrapper will record the processing stack of the wrapped future at the time cancel(boolean) is invoked. When using cancel as a method of timeout (like as provided by Watchdog) this can help expose what the thread was blocked / busy doing at the time of timeout.

  • Profiler and ControlledThreadProfiler

These are utilities for helping to understand where the bottlenecks of your application are. These break down what each thread is doing, as well as the system as a whole. So you can understand where your CPU heavy operations are, where your lock contention exists, and other resources as well.

  • DebugLogger

Often times logging gives a bad conception of what order of operations things are happening in concurrent designs. Or often times just adding logging can cause race conditions to disappear. DebugLogger attempts to solve those problems (or at least help). It does this by collecting log messages, storing the time which they came in (in nano seconds), and then order them. Then in batches it prints the log messages out. Since we are logging out asynchronously, and we try to have the storage of the log message very cheap, it hopefully will not impact the race condition your attempting to investigate.