Retrieving "Method Profiling Sample" event duration

Hello,
I am trying to understand how JMC calculates the Percentage in Hot Methods (which according to documentation is total time that the application spent on executing code in the method), but the duration I retrieve seem to be always zero and start and end timestamps are the same. The way I am trying to do it follow below:
FlightRecording recording = FlightRecordingLoader.loadFile(new File("jfr file path"));    
IView view = recording.createView();
Map <String, IEventType> eventTypes =  new HashMap<String, IEventType>();
for (IEvent event : view) {
     eventTypes.put(event.getEventType().getName(), event.getEventType());
view.setEventTypes(Arrays.asList(eventTypes.get("Method Profiling Sample")));
for (IEvent event : view) {
     System.out.println(event.getValue("(duration)") + " " + ((FLRMethod)event.getValue("((stackTrace).method)")).getMethodName());
Any clarification is highly appreciated!
Thanks in advance.

The Method Profiling Samples do not have a duration,
they are taken at interval of for example 20 ms, where a predefined number of threads are sampled.
All threads cannot be sampled, for example the ones that are executing native code.
It's really "the percentage of the total  number of samples that were taken in this method", which can be seen as an approximation of what the help says "The percentage of total time that the application spent on executing code in the method."
To get this we group together all the samples with the same top frame, there is not one single sample for each method with a total duration for that method.
If you look at the Events/Log, and only enable Java Virtual Machine/Profiling/Method Profiling Sample in the event types view, you will be able to see what kind of data you get.

Similar Messages

  • Flight Recorder does not provide Method Profiling Samples on CentOS 5

    Flight recorder from jdk 1.8.0_05 does not collect information about methods then running under CentOS 5.
    But jdk1.7.0_55 provides "Method Profiling Samples" events on the same machine.
    Steps to reproduce:
    1. Download test class - https://gist.github.com/evsinev/0b136693ef7549ddc9b5
    2. compile it
    3. Run it:
    NOW=$(date +"%H-%M-%S")
    export JAVA_OPTS="$JAVA_OPTS -XX:+UnlockCommercialFeatures -XX:+FlightRecorder"
    export JAVA_OPTS="$JAVA_OPTS -XX:StartFlightRecording=duration=120s,filename=data/profile-startup-${NOW}.jfr,name=Startup,settings=profile"
    export JAVA_OPTS="$JAVA_OPTS -XX:FlightRecorderOptions=samplethreads=true,stackdepth=64"
    /opt/jdk1.8.0_05/bin/java $JAVA_OPTS -cp . Test
    Running with jdk 1.8.0_05 does not provide "Method Profiling Samples"
    Running with jdk 1.7.0_55 provides "Method Profiling Samples"
    Environment:
    CentOS release 5.9 (Final)
    uname:Linux 2.6.18-348.1.1.el5 #1 SMP Tue Jan 22 16:19:19 EST 2013 x86_64
    libc:glibc 2.5 NPTL 2.5

    I've spoken to the developers of the JVM/JDK parts of JFR, and I'm afraid they say this is a known issue
    (https://bugs.openjdk.java.net/browse/JDK-8036090, https://bugs.openjdk.java.net/browse/JDK-8037340)
    that happens on Linux only.
    It will be fixed in 7u60 and 8u20 which will be released later this year.

  • JRockit Management console unable to find classes in Method profiler

    I have no problem to connect the console to the right JVM.
    All tabs work OK so I can see memory and CPU usage. I can even do Method profiling on plain Java objects like String and Long but whenever I specify one of my classes (full path name) I'm unable to find them.
    Any help would be really appreciated,
    MV

    Hi,
    We've tried this internally now, and it works as designed - as long as the class has been loaded, i.e. if any classloader has loaded the class, it will be reachable and should show up properly. If the class hasn't been loaded yet, however, it will not show.
    For instance, say a class C is reachable by only loader L. Trying to retrieve the methods of C before it has been loaded by L will fail. After L.loadClass("C") or similar has been executed the class should show up.
    Kind regards,
    Marcus

  • JRMC4.0: Method profiler not picking the right class instance

    Testing with JRMC 4.0 + R28 1.6
    Method profiler works on unit-test cases. However, when using it on a large scale application, it did not work properly for some of the classes and methods (zero invocation count).
    I searched internet and saw some ppl mentioning about multiple class loader could result that weird behavior. I only using one simple spring class loader, therefore don't know how to resolve it...
    Any suggestion would be appreciated...

    Thanks Erik. The issue is resolved without me doing anything on the application side... I switched back to JRMC 3.1.2, and it works fine.
    Not sure if it's worth looking into to see what's new in 4.0?

  • Cannot find class during Method Profiling

    Hi,
    I used JRockit Mission Control tool 3.0 for method profiling. After RCP application is started, i create a new template and added the following class file to that template : "org.eclipse.draw2D.Figure but
    "can't find class : org.eclipse.draw2D.Figure" error message is displayed. Sometimes the same procedure works fine but sometimes it's not.
    Can anyone help me to resolve this issue.
    Thanks in advance,
    Pragadeesh.R

    In the code you have posted, some places refer to '.CustomerFacader' while others refer to '.CustomerFacade' leading to issues.
    Also: Have you considered using NetBeans 5.5.1 as an alternative to JSE 8.1?
    http://forum.java.sun.com/thread.jspa?threadID=5192837

  • Call AM method on ActionComponent  events

    Hi ,
    i need to perform some action like calling AM method ,isUserValid() tio check if user is valid or not on
    clicking action components like commandbutton and commandlink.
    i can archive this by adding PagePhaseLsitener ,and in beforePahseListener.
    i can handle action event update model process Phase.
    but the issue is i need to execute the AM method only actioncomponet event processing phase
    how to we know the event was generated by Action Component?
    please suggest
    Thanks,
    Karnakar

    Hi all
    requirement is to call AM method on clicking action compoents.
    and every page in application will call the above methods.
    i am overriding action component behiavour ,on clicking of actioncomoent it will execute AM method
    Thanks
    Karnakr

  • Change the default event duration from 1 hour to 1/2 hour

    In iCal, the default event is supposed to last for 1 hour. I want to change the default to 30 minutes. I know I can make the change event by event (which is cumbersome). I cannot find any configuration page to set the default event duration. Is there one?
    (This seeming reality has been bothering me for years; but I'm considering migrating from Entourage to iCal/Address Book/Mail and some of what I feel are inefficiencies in iCal are blocking me from doing so.)

    Typically any such defaults are configured outside of Logic via a utility that came with your Audio Interface.
    Example: if you have a Motu Audio interface you use the Motu Audio Setup Utility to set the default Stereo inputs and outputs... which are then used by Logic via Coreaudio.
    Not knowing what Audio Interface you are using (or mixer..) I would suggest you read the documentation that came with it.. and see how to configure it to what you need.
    Note: Some cheap and/or badly supported interfaces/mixers simply don't provide a utility to enable/change default settings... in which case you are stuck with what they set as the defaults themselves.

  • How do i set the event duration default

    how do i set the event duration default on my iphone calendar.  it is preset to 1 hour and i want to change the dafault duration time

    Every Printer driver allow you to save a set of settings.
    For instance,
    I defined
    A4 black & white
    A4 colors
    listings black & white (which prints two pages on an A4 sheet)
    listing colors (which prints two pages on an A4 sheet)
    Do the same with your settings.
    Use the item Enregistrer or the item Enregistrer sous to save your settings.
    Yvan KOENIG (VALLAURIS, France) jeudi 15 septembre 2011 18:40:26
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Error: "Retrieving user profile failed. Please try again later"

    All day I've been getting "Retrieving user profile failed. Please try again later" when I try webmail,verizon.net.   What can I do?

    Hi sorry to hear you are having an issue with our website.   I would recommend clearing the cache and cookies in your web browser. 
    If you are using IE you can do the following
    1.  Open IE
    2. Click on Tools
    3. Select Internet Options
    4.  Then click on <delete> under browsing history, and put a check in all the boxes
    After it completes re-open IE and try it again.  
    Shamika_Vz Verizon Support
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or Plan.

  • Access method and wait event

    hi,
    i am confused about access method and wait event.
    is there any relation between access method and wait event?

    sb92075 wrote:
    is there any relation between access method and wait event?No relationI disagree. If access method is full table scan or fast full index scan, that's likely to cause db file scattered read waits, whereas an index driven access method such as index range scan will likely cause db file sequential read waits.
    -Mark

  • Mdm abap api retrieve method does not work properly

    Lets say i have
    in a qualified flat lookup several qualifiers.
    i try to get the table using the following code:
      loop at wa_contract_data-CONT_REMINDER into ls_qual_link.
                      wa_keys_reminder = ls_qual_link-QUALIFIED_link_ID.
                      append wa_keys_reminder to lt_keys_reminder.
                CALL METHOD g_mdm_api->mo_core_service->retrieve_simple
                      EXPORTING
                      iv_object_type_code = 'TBL_REM'
                      it_keys = lt_keys_reminder
                      IMPORTING
                      et_ddic_structure = lt_remainder_data.
    endloop.
    finally lt_remainder_data contains only the non qualifier, but not the maintained data of the qualifiers.
    what confuses me is that some fields are even not transfered at all.
    does anyone know how to get what i would expect: the actual data of all other fields?
    Thanks.
    Gideon

    Hi Gideon,
    I have used ABAP API's to successfully retrieve the data from the MDM into a DDIC structure in ECC side using the program Retrive Simple.
    I had followed the webinar by Klaus David. Here is the link for the same:
    ABAP API for SAP NetWeaver Master Data Management - Webinar Replay
    PPT:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/601ddb01-e5c8-2910-d981-b190b51fca44
    Webinar Replay
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00dd47bd-f2f1-2910-5eab-e9ca52465ae4
    These links will take you through the configs, Sample source code for Retrieving data etc using both Retrive Simple & Retrive.
    May be there is a problem with the DDIC that you have designed. ( the data types etc.)
    Here are some additional links:
    Master Data Management ABAP API Overview:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/00c49ffb-e5e5-2910-73ba-c85af1da5b0a
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/tip%2b%2bMDM%2bABAP-API%2b%2bThings%2bto%2bRemember%2b(for%2bStarters)
    Kindly go through the links to figure out the problem.
    Hope it helps.
    Thanks and Regards
    Nitin Jain

  • Error while running Profile synchronization (Event ID: 6398)

    Hi,
    We had our User Profile Synchronization service in stopped state for quite some time due to our SQL server having "Named Instance". Since RTM version had this compatibility issue, I patched my farm with SP2 + FEB 2014 CU.
    Now the "User Profile Synchronization Service" is running (I started it and now it was a success). However when I start the Profile sync job (either INC or FULL), it fails. This is the error I get:
    The Execute method of job definition Microsoft.Office.Server.UserProfiles.UserProfileImportJob (ID c10650ed-0935-47a5-b3ce-a307c576ad9a) threw an exception. More information is included below.
    Operation is not valid due to the current state of the object.
    Log Name: Application
    Source: Microsoft-SharePoint Products-SharePoint Foundation
    Date: 6/25/2014 3:47:16 AM
    Event ID: 6398
    Task Category: Timer
    Level: Critical
    Keywords:
    User: ST\sps02-svc
    Computer: EMEA-MOSS1.st.stroot.local
    Description:
    The Execute method of job definition Microsoft.Office.Server.UserProfiles.UserProfileImportJob (ID c10650ed-0935-47a5-b3ce-a307c576ad9a) threw an exception. More information is included below.
    Operation is not valid due to the current state of the object.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Microsoft-SharePoint Products-SharePoint Foundation" Guid="{6FB7E0CD-52E7-47DD-997A-241563931FC2}" />
    <EventID>6398</EventID>
    <Version>14</Version>
    <Level>1</Level>
    <Task>12</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2014-06-25T03:47:16.577398600Z" />
    <EventRecordID>484089</EventRecordID>
    <Correlation ActivityID="{A6F9E131-4925-4889-A759-5F873C4B2E74}" />
    <Execution ProcessID="9140" ThreadID="7372" />
    <Channel>Application</Channel>
    <Computer>EMEA-MOSS1.st.stroot.local</Computer>
    <Security UserID="S-1-5-21-1058282146-1732951074-3797079023-18290" />
    </System>
    <EventData>
    <Data Name="string0">Microsoft.Office.Server.UserProfiles.UserProfileImportJob</Data>
    <Data Name="string1">c10650ed-0935-47a5-b3ce-a307c576ad9a</Data>
    <Data Name="string2">Operation is not valid due to the current state of the object.</Data>
    </EventData>
    </Event>
    Here are the observations:
    - User Profile Synchronization Service - Running
    - User Profile Service - Running
    - Both FIMS - Running
    - On User Profile Service Application page, I see "User Profile Sync is not currently provisioned."
    - If I go in for "Configure Sync Connections" I see --- The query returns nothing. 
    - On clicking "Create new connection" I get this error:
    What could be wrong now?

    Clear the file system cache on all servers in the server farm on which the Windows SharePoint Services Timer service is running. Please refer to the following link:
    http://ahmedmadany.wordpress.com/2011/05/08/user-profile-service-an-update-conflict-has-occurred-and-you-must-re-try-this-action/
    Make sure that the SharePoint Farm account, which is created during the SharePoint Farm setup, is a member of the local Administrators group where the User Profile Synchronization service is deployed.
    Make sure that the SharePoint Farm account is able to log on locally on the server where User Profile Synchronization is deployed.
    More information are provided in the link below:
    http://www.sysadminsblog.com/microsoft/user-profile-service-an-update-conflict-has-occurred-and-you-must-re-try-this-action/
    http://www.sysadminsblog.com/microsoft/event-6398-microsoft-sharepoint-administration-spsqmtimerjobdefinition-exception/
    If this helped you resolve your issue, please mark it Answered

  • User Profiles Sync - Event Viewer Errors

    While I'm not seeing any actual negative impact on the farm, I constantly get the following errors throughout the day (tied to syncs I believe) and would very much like to remedy them if possible:
    Error type: Critical
    Event ID: 5555
    Task Category: User Profiles
    Failure trying to synch web application <GUID>, ContentDB <GUID> Exception message was System.Data.SqlException: Lock request time out period exceeded.
    Login failed for user '<Domain>\<User>'.
    A severe error occurred on the current command.  The results, if any, should be discarded.
    Error type: Critical
    Event ID: 5555
    Task Category: User Profiles
    Failure trying to synch web application <GUID>, ContentDB <GUID> Exception message was System.InvalidOperationException: Operation is not valid due to the current state of the object.
    Error type: Critical
    Event ID: 6398
    Task Category: Timer
    The Execute method of job definition Microsoft.SharePoint.Administration.SPSqmTimerJobDefinition (ID <GUID>) threw an exception. More information is included below.
    Data is Null.  This method or property cannot be called on Null values.
    Error type: Critical
    Event ID: 6398
    Task Category: Timer
    The Execute method of job definition Microsoft.Office.Server.Administration.UserProfileApplication+LanguageSynchronizationJob (ID <GUID>) threw an exception. More information is included below.
    Lock request time out period exceeded.
    Login failed for user '<Domain>\<User>'
    A sever error occurred on the current command.  The results, if any, should be discarded.
    Error type: Error
    Event ID: 5586
    Task Category: Database
    Unknown SQL Exception 1222 occurred. Additional error information from SQL Server is included below.
    Lock request time out period exceeded.
    Login failed for user '<Domain>\<User>'
    A sever error occurred on the current command.  The results, if any, should be discarded.
    Additionally, the following error appear on the Database side.
    Error type: Information
    Event ID: 18456
    Task Category: Logon
    Login failed for user '<Domain>\<User>'. Reason: An exception was raised while revalidating the login on the connection. Check for previous errors. [CLIENT: <IP>]
    Error type: Error
    Event ID: 18056
    Task Category: Server
    The client was unable to reuse a session with SPID <X>, which had been reset for connection pooling.  The failure ID is 29. This error may have been caused by an earlier operation failing. Check the logs for failed operation immediately before this
    error message.
    I've tried to troubleshoot each of these errors independently hoping that it is one that is causing them all but so far nothing has worked.  The "Login failed" stood out to me the most but that account is the farm account and I've verified
    the credentials and there are no other login failed type errors.  Again, the syncs themselves appear to be successful but these errors always occur.  Any help would be most appreciated.

    And you did the last part also?
    "Finally, and I’m not sure if this is necessary, but I read that you should change timer job “Timer Service Recycle” (Central Administration –> Job Definitions) to run at 06:30 PM.  This last step can be done through Central Administration. 
    After doing this my errors went away.  I did however need to run a full user profile synchronization by going to Central Administration –> Manage Profile Service: SharedServicesSearch_UserProfile –> Start Profile Synchronization"
    Sounds like a good reason, that the timer job runs at the same time as the application pool recycles, thus causing the connection to abort. Then retrying the connection, but a different ID, causing a lock to happen.
    Besides that, it can be hard to say, as setting up the User Profile service application using the Wizard, can do some strange things :/

  • How to call a bean method from javascript event

    Hi,
    I could not find material on how to call a bean method from javascript, any help would be appreciated.
    Ralph

    Hi,
    Basically, I would like to call a method that I have written in the page java bean, or in the session bean, or application bean, or an external bean, from the javascript events (mouseover, on click, etc...) of a ui jsf component. I.e., I would like to take an action when a user clicks in a column in a datatable.
    Cheers,
    Ralph

  • How to call a static method from an event handler

    Hi,
       I'm trying to call a static method of class I designed.  But I don't know how to do it.  This method will be called from an event handler of a web dynpro for Abap application.
    Can somebody help me?
    Thx in advance.
    Hamza.

    To clearly specify the problem.
    I have a big part code that I use many times in my applications. So I decided to put it in a static method to reuse the code.  but my method calls functions module of HR module.  but just after the declaration ( at the first line of the call function) it thows an exception.  So I can't call my method.

Maybe you are looking for

  • How many iPhones can I share applications with?

    General Question, Can I share applications (games) with multiple iPhones? Also - I purchased some games and synced them to my iPhone. Now I want to give this phone to someone else and buy a new one. What happens now to the games? Are the games someho

  • After Leopard Upgrade, HDTV No Longer Displays Full Screen Apple TV??

    Fairly recent Apple convert. iMac is directly connected to HDTV (Mini-DVI to HDMI) and A/V Receiver(Toslink). After Leopard upgrade, I now have a black border, on HDTV, no matter what resolution I choose (worked automatically and perfectly on Tiger).

  • How to get pivot table by using dates

    Hi, How to get pivot table by using dates in column. Below is the sample table and its value is given. create table sample1 Order_DATE       DATE, order_CODE       NUMBER, Order_COUNT   NUMBER Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) v

  • How to get total numbers of lines?

    Hi, Is there any view, where we can know the number of lines in a code. for example, if you have proc1 having 100 lines without whitespace, then it must show you 100 line. hare krishna Alok

  • Shapshot Replication to Master

    I would like to make a snapshot replication from a third party database (any type of database anywhere) to a Master. How hard would it be to set this up for several 100 db and to maintain it?