@@ -55,6 +55,8 @@ private static void addImplicitEntryPoints(Collection<Entrypoint> target, Iterab
55
55
*/
56
56
private Map <EclipseProjectAnalysisEngine <InstanceKey >, Collection <Entrypoint >> enginesWithBuiltCallGraphsToEntrypointsUsed = new HashMap <>();
57
57
58
+ private boolean findImplicitBenchmarkEntryPoints ;
59
+
58
60
private boolean findImplicitEntryPoints = true ;
59
61
60
62
private boolean findImplicitTestEntryPoints ;
@@ -74,9 +76,11 @@ public StreamAnalyzer(boolean visitDocTags, boolean findImplicitEntryPoints) {
74
76
this .findImplicitEntryPoints = findImplicitEntryPoints ;
75
77
}
76
78
77
- public StreamAnalyzer (boolean visitDocTags , boolean findImplicitEntryPoints , boolean findImplicitTestEntryPoints ) {
79
+ public StreamAnalyzer (boolean visitDocTags , boolean findImplicitEntryPoints , boolean findImplicitTestEntryPoints ,
80
+ boolean findImplicitBenchmarkEntryPoints ) {
78
81
this (visitDocTags , findImplicitEntryPoints );
79
82
this .findImplicitTestEntryPoints = findImplicitTestEntryPoints ;
83
+ this .findImplicitBenchmarkEntryPoints = findImplicitBenchmarkEntryPoints ;
80
84
}
81
85
82
86
/**
@@ -202,6 +206,14 @@ protected Collection<Entrypoint> buildCallGraph(EclipseProjectAnalysisEngine<Ins
202
206
addImplicitEntryPoints (entryPoints , jUnitEntryPoints );
203
207
}
204
208
209
+ if (this .findImplicitBenchmarkEntryPoints ) {
210
+ // try to find benchmark entry points.
211
+ Set <Entrypoint > benchmarkEntryPoints = Util .findBenchmarkEntryPoints (engine .getClassHierarchy ());
212
+
213
+ // add them as well.
214
+ addImplicitEntryPoints (entryPoints , benchmarkEntryPoints );
215
+ }
216
+
205
217
if (entryPoints .isEmpty ()) {
206
218
LOGGER .warning (() -> "Project: " + engine .getProject ().getElementName () + " has no entry points." );
207
219
return entryPoints ;
0 commit comments