Giter Site home page Giter Site logo

Comments (4)

idelvall avatar idelvall commented on May 27, 2024

This has a limitation though, listeners should not create new threads. This can be handled by instrumenting java.lang.Thread to populate the parent thread flag state, or at least can just be documented as a limitation

from bctrace.

idelvall avatar idelvall commented on May 27, 2024

We could avoid dealing with this if we follow this idea

from bctrace.

idelvall avatar idelvall commented on May 27, 2024

I have been thinking in this. And I don't see a way of avoiding the thread local checking at

private static final ThreadLocal<Boolean> NOTIFYING_FLAG = new ThreadLocal<Boolean>();
, that lets the callback activate/deactivate listener notification, so no recursive notification can occur.

We could load listener implementations in a custom classloader and exclude that classloader from being instrumented (that would improve our current package-based exclusion), but eventually those classes could make use of classes from parent classloaders, namely the bootstrap classloader that are indeed instrumented.

What do you think?

from bctrace.

idelvall avatar idelvall commented on May 27, 2024

By removing this check we gain around 3ms in helloshiftleft test latency.
From:

ShiftLefts-MacBook-Pro:~ ignacio$ echo "GET http://0.0.0.0:8080/customers" | vegeta attack -duration 10s -insecure | vegeta report
Requests      [total, rate]            500, 50.10
Duration      [total, attack, wait]    9.993210496s, 9.97999991s, 13.210586ms
Latencies     [mean, 50, 95, 99, max]  13.450733ms, 13.546259ms, 16.432319ms, 17.676689ms, 19.020605ms
Bytes In      [total, mean]            705000, 1410.00
Bytes Out     [total, mean]            0, 0.00
Success       [ratio]                  100.00%
Status Codes  [code:count]             200:500  
Error Set:

to:

ShiftLefts-MacBook-Pro:~ ignacio$ echo "GET http://0.0.0.0:8080/customers" | vegeta attack -duration 10s -insecure | vegeta report
Requests      [total, rate]            500, 50.10
Duration      [total, attack, wait]    9.993284757s, 9.979999899s, 13.284858ms
Latencies     [mean, 50, 95, 99, max]  11.060517ms, 11.333885ms, 13.485156ms, 13.819625ms, 14.48848ms
Bytes In      [total, mean]            705000, 1410.00
Bytes Out     [total, mean]            0, 0.00
Success       [ratio]                  100.00%
Status Codes  [code:count]             200:500  

from bctrace.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.