Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Support TappingDevice::Device#stop_when #4

Merged
merged 2 commits into from
Nov 1, 2019
Merged

Commits on Nov 1, 2019

  1. Add stop_when method to Device for adding stop condition

    The biggest issue `tapping_device` has is about performance. Because
    TracePoint literally taps every method call on every object if nothing
    disable it. So using `tapping_device` on large application with multiple
    tappings can be extremely slow or even hang your application.
    
    This commit tries to solve this issue by:
    
    1. Adding `TappingDevice::Device#stop_when` to let users add stop
    condition. Once the block evaluation returns anything truthy, the
    tapping would be stopped.
    
    2. Adding `tap_init`, `tap_on` and `tap_assoc` methods, which will first
    check if `stop_when` condition is provided and raise exception if not.
    st0012 committed Nov 1, 2019
    Configuration menu
    Copy the full SHA
    c4c0f8e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1092ca6 View commit details
    Browse the repository at this point in the history