@@ -63,15 +63,22 @@ public void setInstrumentationClasses(List<String> instrumentationClasses) {
6363 }
6464
6565
66+ public enum DispatchEventType {
67+ STRATEGY_DISPATCH ,
68+ MANUAL_DISPATCH ,
69+ }
70+
6671 public static class DispatchEvent {
6772 final String dataLoaderName ;
6873 final @ Nullable Integer level ; // is null for delayed dispatching
6974 final int count ; // how many
75+ final DispatchEventType type ;
7076
71- public DispatchEvent (String dataLoaderName , @ Nullable Integer level , int count ) {
77+ public DispatchEvent (String dataLoaderName , @ Nullable Integer level , int count , DispatchEventType type ) {
7278 this .dataLoaderName = dataLoaderName ;
7379 this .level = level ;
7480 this .count = count ;
81+ this .type = type ;
7582 }
7683
7784 public String getDataLoaderName () {
@@ -86,10 +93,15 @@ public int getCount() {
8693 return count ;
8794 }
8895
96+ public DispatchEventType getType () {
97+ return type ;
98+ }
99+
89100 @ Override
90101 public String toString () {
91102 return "DispatchEvent{" +
92- "dataLoaderName='" + dataLoaderName + '\'' +
103+ "type=" + type +
104+ ", dataLoaderName='" + dataLoaderName + '\'' +
93105 ", level=" + level +
94106 ", count=" + count +
95107 '}' ;
@@ -164,8 +176,8 @@ void chainedStrategyDispatching(int level) {
164176 chainedStrategyDispatching .add (level );
165177 }
166178
167- void addDispatchEvent (String dataLoaderName , @ Nullable Integer level , int count ) {
168- dispatchEvents .add (new DispatchEvent (dataLoaderName , level , count ));
179+ void addDispatchEvent (String dataLoaderName , @ Nullable Integer level , int count , DispatchEventType type ) {
180+ dispatchEvents .add (new DispatchEvent (dataLoaderName , level , count , type ));
169181 }
170182
171183 // public getters
@@ -358,6 +370,7 @@ public List<Map<String, Object>> getDispatchEventsAsMap() {
358370
359371 @ Override
360372 public String toString () {
361- return shortSummary ();
373+ return "ProfilerResult" + shortSummaryMap ();
362374 }
375+
363376}
0 commit comments