Git Product home page Git Product logo

Comments (8)

jbachorik avatar jbachorik commented on July 4, 2024

[author="joachimhskeie", created="Wed, 27 Jan 2010 00:42:19 +0100"]

I have made some changes to BTraceUtils and BTraceRuntime to be able to get hold of this data for the BTrace Script.

Attaching HG Diff file with the following changes:

  • Added GarbageCollectionMXBean to BTraceRuntime
  • Added methods to Utils and Runtime to return the total time in GC since application startup
  • Added a few methods to be able to work better with the Deque

Attaching BTrace script file with the following functionality:

  • Creation of a Deque
  • Every 15 seconds the time spent in GC is collected and pushed to the very end of the Deque
  • Once the size of the Deque reaches 60 (15 minutes), the first element is subtracted from the second element of the queue, divided with the time between the first and last element
  • The very first element is removed from the deque

I havent debugged this extensively, and some exception handling might be needed when working with the deque, but overall I think this should work.

I will leave it to you to decide if this should be part of a BTrace Script like proposed, or if more logic should be placed inside BTraceRuntime and BTraceUtils.

This originated from http://jira.haagen.name/browse/EUREKAJ-33

from btrace.

jbachorik avatar jbachorik commented on July 4, 2024

[author="jbachorik", created="Fri, 19 Feb 2010 13:27:14 +0100"]

The patch looks good.
Unfortunately, as I've recently learned the hard way, I will need you to sign a SCA (http://www.sun.com/software/opensource/contributor_agreement.jsp) before being (legally) able to apply any of yours patches.

from btrace.

jbachorik avatar jbachorik commented on July 4, 2024

[author="joachimhskeie", created="Fri, 19 Feb 2010 20:11:41 +0100"]

Hello,

Do you have an email address where I can email the signed SCA to ?

from btrace.

jbachorik avatar jbachorik commented on July 4, 2024

[author="jbachorik", created="Wed, 24 Feb 2010 12:02:31 +0100"]

Unfortunately, due to pending acquisition there is no new SCA available yet and the old one has been rendered invalid (so it is not possible to accept any contribution till a new SCA and the related process is created) ((

from btrace.

jbachorik avatar jbachorik commented on July 4, 2024

[author="joachimhskeie", created="Fri, 9 Apr 2010 07:21:05 +0200"]

Hello, is there any advances regarding a new SCA now that the Oracle acquisition is final ?

from btrace.

jbachorik avatar jbachorik commented on July 4, 2024

[author="jbachorik", created="Wed, 14 Apr 2010 11:48:05 +0200"]

Well, the situation is still misty, but it seems that the NetBeans ACA will be fine even for BTrace. Check out this site http://wiki.netbeans.org/FaqHowDoIFileACA to fill out and process the request.

from btrace.

jbachorik avatar jbachorik commented on July 4, 2024

[author="joachimhskeie", created="Fri, 16 Apr 2010 23:13:58 +0200"]

Hello again, i have been added to the SCA contributers list: https://sca.dev.java.net/CA_signatories.htm

from btrace.

jbachorik avatar jbachorik commented on July 4, 2024

[author="jbachorik", created="Fri, 23 Apr 2010 13:14:08 +0200"]

Applying joachims changes:
http://kenai.com/projects/btrace/sources/hg/revision/292
http://kenai.com/projects/btrace/sources/hg/revision/293

I split the patch to to commits - one for GC MBean and one for advanced Deque functionality.
I left out the "dequeHasAtLeastElements(Deque deque, int expectedElements)" method which can be replaced by calling "if (size(deque) >= expectedElements)"

from btrace.

Related Issues (20)

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.