Skip to content

Commit f213f41

Browse files
authored
Incorporate review comments (#84)
* Incorporate review comments * Add 24.03 * Update README * Update image * Correct target version to 1.8
1 parent edf76ae commit f213f41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+196
-154
lines changed

.github/workflows/test-against-released.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
- 14.1.1-0-16
4646
- 22.06.7
4747
- 22.06.6
48-
- 23.09
4948
- 23.09.1
5049
- 23.09.2
50+
- 24.03
5151

5252
steps:
5353
- name: Checkout

README.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ NOTE: The most current version of the Plugin requires VisualVM release 2.1 or la
3333

3434
The Plugin will connect to and display data for the following Coherence versions:
3535

36-
* **Community Editions**: 24.03.x, 23.09.x, 22.06.x, 21.12.x (*), 14.1.1.0.x
36+
* **Community Editions**: 24.03.x, 23.09.x, 22.06.x, 14.1.1.0.x
3737

38-
* **Commercial Editions**: 14.1.1.2206.x, 14.1.1.0.x, 12.2.1.5.x, 12.2.1.4.x 12.1.3.x and 12.1.2.x
38+
* **Commercial Editions**: 14.1.1.2206.x, 14.1.1.0.x and 12.2.1.4.x
3939

4040
>Note: If you wish to connect to Coherence version 12.2.1.4.x via REST you should have Coherence version 12.2.1.4.7 or greater.
4141
@@ -195,18 +195,37 @@ Depending upon the edition and functionality you are using, the following option
195195

196196
## <a id="tracer"></a> Using Coherence with the Tracer framework
197197

198-
Version 1.7.0 of the Coherence VisualVM Plugin introduces initial integration with the VisualVM Tracer framework.
198+
Version 1.7.0 of the Coherence VisualVM Plugin introduces initial integration with the
199+
VisualVM Tracer framework.
199200

200-
From the VisualVM website
201+
From the VisualVM website:
201202

202203
> The VisualVM Tracer framework provides detailed monitoring and analyzing Java applications. Using various probes,
203204
> the Tracer gathers metrics from an application and displays the data in a timeline. The data are
204205
> displayed both graphically and in a table and can be exported to common formats for further processing
205206
> by external tools.
206207
207-
When you connect to a cluster via JMX, you will see the `Tracer` tab as shown below:
208+
After installation, when you connect to a cluster via JMX, you will see the `Tracer` tab as shown below:
208209

209-
TBC.
210+
![Tracer Tab](assets/visualvm-tracer.png)
211+
212+
There are a number of expandable groups allowing you to choose Coherence related probes to display on the timeline including:
213+
214+
* Coherence Cluster Overview - shows general cluster data such as members, heap, package publisher/receive rates and load averages
215+
* Coherence Services - Overall - shows overall service partition data
216+
* Coherence Services - Selected - shows data for the selected service only
217+
* Coherence Caches - Overall - shows overall cache data such as total cache sizes and memory usage
218+
* Coherence Caches - Selected - shows data for the selected cache only
219+
* Coherence Proxy Servers - shows proxy connection details and outgoing backlogs
220+
* Coherence Persistence - shows active and backup persistence data as well as maximum latency
221+
* Coherence Federation - shows send and receive rates
222+
* Coherence Elastic Data - shows elastic data flash a ram journal usage
223+
224+
To start recording tracer data, select the tracer probes that you wish to display and click `Start`.
225+
226+
> Note: The data displayed is the same as is display on the various Coherence tabs.
227+
228+
![Tracer Tab](assets/visualvm-tracer-timeline.png)
210229

211230
## <a id="build"></a> Building the Plugin
212231

assets/visualvm-tracer-timeline.png

236 KB
Loading

assets/visualvm-tracer.png

201 KB
Loading

coherence-visualvm-plugin/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,6 @@
169169
<source>${java.version}</source>
170170
<target>${java.version}</target>
171171
<release>${java.version.release}</release>
172-
<compilerArgs>
173-
<arg>--add-opens</arg>
174-
<arg>jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED</arg>
175-
</compilerArgs>
176172
</configuration>
177173
</plugin>
178174

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cache/CacheMemorySizeProbe.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@
2727

2828
import com.oracle.coherence.plugin.visualvm.Localization;
2929
import com.oracle.coherence.plugin.visualvm.VisualVMModel;
30+
3031
import com.oracle.coherence.plugin.visualvm.tablemodel.model.CacheData;
32+
3133
import com.oracle.coherence.plugin.visualvm.tracer.AbstractCoherenceMonitorProbe;
34+
3235
import org.graalvm.visualvm.modules.tracer.ItemValueFormatter;
3336
import org.graalvm.visualvm.modules.tracer.ProbeItemDescriptor;
3437
import org.graalvm.visualvm.modules.tracer.TracerProbeDescriptor;
3538

39+
import static com.oracle.coherence.plugin.visualvm.helper.GraphHelper.MB;
40+
3641
/**
3742
* Tracer probe to return the total memory size of all caches across all services.
3843
*
@@ -68,7 +73,7 @@ private static ProbeItemDescriptor[] createItemDescriptors()
6873
{
6974
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL),
7075
getMonitorsString(LBL), ItemValueFormatter.DEFAULT_BYTES,
71-
1d, 0, 1),
76+
1d, 0, MB),
7277
};
7378
}
7479

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cache/CacheSizeProbe.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
package com.oracle.coherence.plugin.visualvm.tracer.cache;
2727

28-
import com.oracle.coherence.plugin.visualvm.Localization;
2928
import com.oracle.coherence.plugin.visualvm.VisualVMModel;
3029

3130
import com.oracle.coherence.plugin.visualvm.tablemodel.model.CacheData;
@@ -36,6 +35,8 @@
3635
import org.graalvm.visualvm.modules.tracer.ProbeItemDescriptor;
3736
import org.graalvm.visualvm.modules.tracer.TracerProbeDescriptor;
3837

38+
import static com.oracle.coherence.plugin.visualvm.Localization.getLocalText;
39+
3940
/**
4041
* Tracer probe to return the total number of cache entries across all services.
4142
*
@@ -61,17 +62,17 @@ public long[] getValues(VisualVMModel model)
6162

6263
public static TracerProbeDescriptor createDescriptor(boolean available)
6364
{
64-
return new TracerProbeDescriptor(Localization.getLocalText(LBL),
65-
Localization.getLocalText("LBL_cache_size_desc"), ICON, 10, available);
65+
return new TracerProbeDescriptor(getLocalText(LBL),
66+
getLocalText("LBL_cache_size_desc"), ICON, 10, available);
6667
}
6768

6869
private static ProbeItemDescriptor[] createItemDescriptors()
6970
{
7071
return new ProbeItemDescriptor[]
7172
{
72-
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL),
73+
ProbeItemDescriptor.continuousLineFillItem(getLocalText("LBL_all_caches") + " - " + getLocalText(LBL),
7374
getMonitorsString(LBL), ItemValueFormatter.DEFAULT_DECIMAL,
74-
1d, 0, 1),
75+
1d, 0, 0),
7576
};
7677
}
7778

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cache/SelectedCacheListenersProbe.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ private static ProbeItemDescriptor[] createItemDescriptors()
7474
{
7575
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL1),
7676
getMonitorsString(LBL1), ItemValueFormatter.DEFAULT_DECIMAL,
77-
1d, 0, 1),
77+
1d, 0, 0),
7878
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL2),
7979
getMonitorsString(LBL2), ItemValueFormatter.DEFAULT_DECIMAL,
80-
1d, 0, 1),
80+
1d, 0, 0),
8181
};
8282
}
8383

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cache/SelectedCacheMemoryProbe.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ private static ProbeItemDescriptor[] createItemDescriptors()
7575
{
7676
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL1),
7777
getMonitorsString(LBL1), ItemValueFormatter.DEFAULT_BYTES,
78-
1d, 0, 1),
78+
1d, 0, 0),
7979
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL2),
8080
getMonitorsString(LBL2), ItemValueFormatter.DEFAULT_BYTES,
81-
1d, 0, 1),
81+
1d, 0, 0),
8282
};
8383
}
8484

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cache/SelectedCacheQueryProbe.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ private static ProbeItemDescriptor[] createItemDescriptors()
7373
{
7474
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL),
7575
getMonitorsString(LBL), new CustomFormatter(1000, "ms"),
76-
1000d, 0, 1),
76+
1000d, 0, 0),
7777
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL2),
7878
getMonitorsString(LBL2), new CustomFormatter(1000, "ms"),
79-
1000d, 0, 1),
79+
1000d, 0, 0),
8080
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL3),
8181
getMonitorsString(LBL3), new CustomFormatter(1000, "ms"),
82-
1000d, 0, 1),
82+
1000d, 0, 0),
8383
};
8484
}
8585

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cache/SelectedCacheSizeProbe.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,19 @@
2525

2626
package com.oracle.coherence.plugin.visualvm.tracer.cache;
2727

28-
import com.oracle.coherence.plugin.visualvm.Localization;
28+
2929
import com.oracle.coherence.plugin.visualvm.VisualVMModel;
30-
import com.oracle.coherence.plugin.visualvm.tablemodel.model.CacheData;
30+
3131
import com.oracle.coherence.plugin.visualvm.tablemodel.model.CacheDetailData;
32+
3233
import com.oracle.coherence.plugin.visualvm.tracer.AbstractCoherenceMonitorProbe;
34+
3335
import org.graalvm.visualvm.modules.tracer.ItemValueFormatter;
3436
import org.graalvm.visualvm.modules.tracer.ProbeItemDescriptor;
3537
import org.graalvm.visualvm.modules.tracer.TracerProbeDescriptor;
3638

39+
import static com.oracle.coherence.plugin.visualvm.Localization.getLocalText;
40+
3741
/**
3842
* Tracer probe to return the total number of cache entries across all services.
3943
*
@@ -59,17 +63,17 @@ public long[] getValues(VisualVMModel model)
5963

6064
public static TracerProbeDescriptor createDescriptor(boolean available)
6165
{
62-
return new TracerProbeDescriptor(Localization.getLocalText("LBL_selected_cache_size"),
63-
Localization.getLocalText("LBL_selected_cache_size_desc"), ICON, 10, available);
66+
return new TracerProbeDescriptor(getLocalText("LBL_selected_cache_size"),
67+
getLocalText("LBL_selected_cache_size_desc"), ICON, 10, available);
6468
}
6569

6670
private static ProbeItemDescriptor[] createItemDescriptors()
6771
{
6872
return new ProbeItemDescriptor[]
6973
{
70-
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL),
74+
ProbeItemDescriptor.continuousLineFillItem(getLocalText("LBL_cache") + " - " + getLocalText(LBL),
7175
getMonitorsString(LBL), ItemValueFormatter.DEFAULT_DECIMAL,
72-
1d, 0, 1),
76+
1d, 0, 0),
7377
};
7478
}
7579

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cluster/ClusterSizeProbe.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ private static ProbeItemDescriptor[] createItemDescriptors()
8888
{
8989
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL),
9090
getMonitorsString(LBL), ItemValueFormatter.DEFAULT_DECIMAL,
91-
1d, 0, 1),
91+
1d, 0, 0),
9292
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL2),
9393
getMonitorsString(LBL2), ItemValueFormatter.DEFAULT_DECIMAL,
94-
1d, 0, 1),
94+
1d, 0, 0),
9595
};
9696
}
9797

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cluster/DepartureCountProbe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private static ProbeItemDescriptor[] createItemDescriptors()
6969
{
7070
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL),
7171
getMonitorsString(LBL), ItemValueFormatter.DEFAULT_DECIMAL,
72-
1d, 0, 1),
72+
1d, 0, 0),
7373
};
7474
}
7575

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cluster/LoadAverageProbe.java

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,18 @@
2828
import java.util.List;
2929
import java.util.Map;
3030

31-
import static com.oracle.coherence.plugin.visualvm.helper.GraphHelper.GRPH_CURRENT_AVERAGE;
32-
import static com.oracle.coherence.plugin.visualvm.helper.GraphHelper.GRPH_MAXIMUM;
33-
import static com.oracle.coherence.plugin.visualvm.panel.AbstractCoherencePanel.getClusterLoadAverage;
34-
35-
import com.oracle.coherence.plugin.visualvm.Localization;
3631
import com.oracle.coherence.plugin.visualvm.VisualVMModel;
3732
import com.oracle.coherence.plugin.visualvm.tablemodel.model.Data;
3833
import com.oracle.coherence.plugin.visualvm.tracer.AbstractCoherenceMonitorProbe;
3934
import org.graalvm.visualvm.modules.tracer.ProbeItemDescriptor;
4035
import org.graalvm.visualvm.modules.tracer.TracerProbeDescriptor;
4136

37+
import static com.oracle.coherence.plugin.visualvm.Localization.getLocalText;
38+
import static com.oracle.coherence.plugin.visualvm.helper.GraphHelper.GRPH_CURRENT_AVERAGE;
39+
import static com.oracle.coherence.plugin.visualvm.helper.GraphHelper.GRPH_MAXIMUM;
40+
import static com.oracle.coherence.plugin.visualvm.panel.AbstractCoherencePanel.getClusterLoadAverage;
41+
42+
4243
/**
4344
* Tracer probe to return average and max load average.
4445
*
@@ -73,27 +74,31 @@ public long[] getValues(VisualVMModel model)
7374

7475
return new long[]
7576
{
76-
(long) ((cTotalLoadAverage / (cCount * 1.0f)) * 1000),
77-
(long) (cMax * 1000)
77+
(long) (cMax * 1000),
78+
(long) ((cTotalLoadAverage / (cCount * 1.0f)) * 1000)
7879
};
7980
}
8081

8182
public static TracerProbeDescriptor createDescriptor(boolean available)
8283
{
83-
return new TracerProbeDescriptor(Localization.getLocalText("GRPH_load_average"),
84-
Localization.getLocalText("LBL_load_average_desc"), ICON, 15, available);
84+
return new TracerProbeDescriptor(getLocalText("GRPH_load_average"),
85+
getLocalText("LBL_load_average_desc"), ICON, 15, available);
8586
}
8687

8788
private static ProbeItemDescriptor[] createItemDescriptors()
8889
{
8990
return new ProbeItemDescriptor[]
9091
{
91-
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(GRPH_CURRENT_AVERAGE),
92-
getMonitorsString(GRPH_CURRENT_AVERAGE), CUSTOM_FORMATTER,
93-
1000, 0, 1),
94-
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(GRPH_MAXIMUM),
92+
ProbeItemDescriptor.continuousLineFillItem(getLocalText(LBL) + " - " + getLocalText(GRPH_MAXIMUM),
9593
getMonitorsString(GRPH_MAXIMUM), CUSTOM_FORMATTER,
96-
1000, 0, 1)
94+
1000, 0, 0),
95+
ProbeItemDescriptor.continuousLineFillItem(getLocalText(LBL) + " - " + getLocalText(GRPH_CURRENT_AVERAGE),
96+
getMonitorsString(GRPH_CURRENT_AVERAGE), CUSTOM_FORMATTER,
97+
1000, 0, 0)
9798
};
9899
}
100+
101+
// ----- constants ------------------------------------------------------
102+
103+
private static final String LBL = "LBL_load_average";
99104
}

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/tracer/cluster/PacketPublisherProbe.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,19 @@
2828
import java.util.List;
2929
import java.util.Map;
3030

31-
import static com.oracle.coherence.plugin.visualvm.helper.GraphHelper.GRPH_CURRENT_AVERAGE;
32-
import static com.oracle.coherence.plugin.visualvm.helper.GraphHelper.GRPH_MINIMUM;
33-
import static com.oracle.coherence.plugin.visualvm.panel.AbstractCoherencePanel.getMemberMemoryRateData;
34-
35-
import com.oracle.coherence.plugin.visualvm.Localization;
3631
import com.oracle.coherence.plugin.visualvm.VisualVMModel;
3732
import com.oracle.coherence.plugin.visualvm.tablemodel.model.Data;
3833
import com.oracle.coherence.plugin.visualvm.tracer.AbstractCoherenceMonitorProbe;
3934

4035
import org.graalvm.visualvm.modules.tracer.ProbeItemDescriptor;
4136
import org.graalvm.visualvm.modules.tracer.TracerProbeDescriptor;
4237

38+
import static com.oracle.coherence.plugin.visualvm.Localization.getLocalText;
39+
import static com.oracle.coherence.plugin.visualvm.helper.GraphHelper.GRPH_CURRENT_AVERAGE;
40+
import static com.oracle.coherence.plugin.visualvm.helper.GraphHelper.GRPH_MINIMUM;
41+
import static com.oracle.coherence.plugin.visualvm.panel.AbstractCoherencePanel.getMemberMemoryRateData;
42+
43+
4344
/**
4445
* Tracer probe to return average and minimum package publisher.
4546
*
@@ -52,7 +53,7 @@ public class PacketPublisherProbe
5253

5354
public PacketPublisherProbe(MonitoredDataResolver resolver)
5455
{
55-
super(2, createItemDescriptors(), resolver);
56+
super(2, createItemDescriptors("LBL_publisher"), resolver);
5657
}
5758

5859
// ---- TracerProbe methods ---------------------------------------------
@@ -82,18 +83,18 @@ public long[] getValues(VisualVMModel model)
8283

8384
public static TracerProbeDescriptor createDescriptor(boolean available)
8485
{
85-
return new TracerProbeDescriptor(Localization.getLocalText("GRPH_packet_publisher"),
86-
Localization.getLocalText("LBL_packet_publisher_desc"), ICON, 15, available);
86+
return new TracerProbeDescriptor(getLocalText("GRPH_packet_publisher"),
87+
getLocalText("LBL_packet_publisher_desc"), ICON, 15, available);
8788
}
8889

89-
protected static ProbeItemDescriptor[] createItemDescriptors()
90+
protected static ProbeItemDescriptor[] createItemDescriptors(String sLabel)
9091
{
9192
return new ProbeItemDescriptor[]
9293
{
93-
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(GRPH_CURRENT_AVERAGE),
94+
ProbeItemDescriptor.continuousLineFillItem(getLocalText(sLabel) + " - " + getLocalText(GRPH_CURRENT_AVERAGE),
9495
getMonitorsString(GRPH_CURRENT_AVERAGE), CUSTOM_FORMATTER,
9596
1, 0, 1000),
96-
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(GRPH_MINIMUM),
97+
ProbeItemDescriptor.continuousLineFillItem(getLocalText(sLabel) + " - " + getLocalText(GRPH_MINIMUM),
9798
getMonitorsString(GRPH_MINIMUM), CUSTOM_FORMATTER,
9899
1, 0, 1000)
99100
};

0 commit comments

Comments
 (0)