Skip to content

Commit

Permalink
6967: Add Percentage Column w.r.t 'Profiling Samples' in Thread table
Browse files Browse the repository at this point in the history
Reviewed-by: aptmac
  • Loading branch information
Guru Hb committed Jun 21, 2021
1 parent 6723a70 commit 7f38790
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ public class Messages extends NLS {
public static String JavaApplicationPage_COLUMN_THREAD_DURATION_DESC;
public static String JavaApplicationPage_COLUMN_THREAD_END;
public static String JavaApplicationPage_COLUMN_THREAD_END_DESC;
public static String JavaApplicationPage_COLUMN_THREAD_PERCENTAGE;
public static String JavaApplicationPage_COLUMN_THREAD_PERCENTAGE_DESC;
public static String JavaApplicationPage_COLUMN_THREAD_START;
public static String JavaApplicationPage_COLUMN_THREAD_START_DESC;
public static String JavaApplicationPage_EDIT_THREAD_LANES_ACTION;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -159,6 +159,7 @@ public Color getColor(IQuantity balance) {
private static final String CLASSLOAD_TIME_COL = "classloadingTime"; //$NON-NLS-1$
private static final String APPLICATION_PAUSE_ID = "applicationPause"; //$NON-NLS-1$
private static final String ACTIVITY_LANES_ID = "threadActivityLanes"; //$NON-NLS-1$
private static final String PROFILING_PERCENTAGE_COL = "profilingCount.Percentage"; //$NON-NLS-1$

private static final ItemHistogramBuilder HISTOGRAM = new ItemHistogramBuilder();

Expand Down Expand Up @@ -205,6 +206,9 @@ public Color getColor(IQuantity balance) {
return null;
}, Messages.JavaApplicationPage_COLUMN_THREAD_DURATION,
Messages.JavaApplicationPage_COLUMN_THREAD_DURATION_DESC);
HISTOGRAM.addPercentageColumn(PROFILING_PERCENTAGE_COL, JdkAggregators.EXECUTION_SAMPLE_COUNT,
Messages.JavaApplicationPage_COLUMN_THREAD_PERCENTAGE,
Messages.JavaApplicationPage_COLUMN_THREAD_PERCENTAGE_DESC);
}

private class JavaApplicationUi extends ChartAndTableUI {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ ExceptionsPage_THROWABLES_LOG_SELECTION=Throwables Log Selection
ExceptionsPage_THROWABLES_TIMELINE_SELECTION=Throwables Timeline Selection
SEARCH_TREE_TEXT=Search the tree

JavaApplicationPage_COLUMN_THREAD_PERCENTAGE=Percentage
JavaApplicationPage_COLUMN_THREAD_PERCENTAGE_DESC=Percentage over total Profiling samples
JavaApplicationPage_COLUMN_THREAD_START=Thread Start
JavaApplicationPage_COLUMN_THREAD_START_DESC=Thread start time if available
JavaApplicationPage_COLUMN_THREAD_END=Thread End
Expand Down

0 comments on commit 7f38790

Please sign in to comment.