@@ -28,7 +28,8 @@ public class ProfilerResult {
2828 private long endTime ;
2929 private long engineTotalRunningTime ;
3030 private final AtomicInteger totalDataFetcherInvocations = new AtomicInteger ();
31- private final AtomicInteger totalPropertyDataFetcherInvocations = new AtomicInteger ();
31+ private final AtomicInteger totalTrivialDataFetcherInvocations = new AtomicInteger ();
32+ private final AtomicInteger totalWrappedTrivialDataFetcherInvocations = new AtomicInteger ();
3233
3334 // this is the count of how many times a data loader was invoked per data loader name
3435 private final Map <String , Integer > dataLoaderLoadInvocations = new ConcurrentHashMap <>();
@@ -108,7 +109,8 @@ public String toString() {
108109 }
109110
110111 public enum DataFetcherType {
111- PROPERTY_DATA_FETCHER ,
112+ WRAPPED_TRIVIAL_DATA_FETCHER ,
113+ TRIVIAL_DATA_FETCHER ,
112114 CUSTOM
113115 }
114116
@@ -130,8 +132,10 @@ void setDataLoaderChainingEnabled(boolean dataLoaderChainingEnabled) {
130132 void setDataFetcherType (String key , DataFetcherType dataFetcherType ) {
131133 dataFetcherTypeMap .putIfAbsent (key , dataFetcherType );
132134 totalDataFetcherInvocations .incrementAndGet ();
133- if (dataFetcherType == DataFetcherType .PROPERTY_DATA_FETCHER ) {
134- totalPropertyDataFetcherInvocations .incrementAndGet ();
135+ if (dataFetcherType == DataFetcherType .TRIVIAL_DATA_FETCHER ) {
136+ totalTrivialDataFetcherInvocations .incrementAndGet ();
137+ } else if (dataFetcherType == DataFetcherType .WRAPPED_TRIVIAL_DATA_FETCHER ) {
138+ totalWrappedTrivialDataFetcherInvocations .incrementAndGet ();
135139 }
136140 }
137141
@@ -199,10 +203,10 @@ public Set<String> getCustomDataFetcherFields() {
199203 return result ;
200204 }
201205
202- public Set <String > getPropertyDataFetcherFields () {
206+ public Set <String > getTrivialDataFetcherFields () {
203207 Set <String > result = new LinkedHashSet <>(fieldsFetched );
204208 for (String field : fieldsFetched ) {
205- if (dataFetcherTypeMap .get (field ) == DataFetcherType .PROPERTY_DATA_FETCHER ) {
209+ if (dataFetcherTypeMap .get (field ) == DataFetcherType .TRIVIAL_DATA_FETCHER ) {
206210 result .add (field );
207211 }
208212 }
@@ -214,12 +218,12 @@ public int getTotalDataFetcherInvocations() {
214218 return totalDataFetcherInvocations .get ();
215219 }
216220
217- public int getTotalPropertyDataFetcherInvocations () {
218- return totalPropertyDataFetcherInvocations .get ();
221+ public int getTotalTrivialDataFetcherInvocations () {
222+ return totalTrivialDataFetcherInvocations .get ();
219223 }
220224
221225 public int getTotalCustomDataFetcherInvocations () {
222- return totalDataFetcherInvocations .get () - totalPropertyDataFetcherInvocations .get ();
226+ return totalDataFetcherInvocations .get () - totalTrivialDataFetcherInvocations . get () - totalWrappedTrivialDataFetcherInvocations .get ();
223227 }
224228
225229 public long getStartTime () {
@@ -272,7 +276,8 @@ public Map<String, Object> shortSummaryMap() {
272276 result .put ("totalRunTime" , (endTime - startTime ) + "(" + (endTime - startTime ) / 1_000_000 + "ms)" );
273277 result .put ("engineTotalRunningTime" , engineTotalRunningTime + "(" + engineTotalRunningTime / 1_000_000 + "ms)" );
274278 result .put ("totalDataFetcherInvocations" , totalDataFetcherInvocations );
275- result .put ("totalPropertyDataFetcherInvocations" , totalPropertyDataFetcherInvocations );
279+ result .put ("totalTrivialDataFetcherInvocations" , totalTrivialDataFetcherInvocations );
280+ result .put ("totalWrappedTrivialDataFetcherInvocations" , totalWrappedTrivialDataFetcherInvocations );
276281 result .put ("fieldsFetchedCount" , fieldsFetched .size ());
277282 result .put ("dataLoaderChainingEnabled" , dataLoaderChainingEnabled );
278283 result .put ("dataLoaderLoadInvocations" , dataLoaderLoadInvocations );
0 commit comments