File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -282,10 +282,15 @@ def thing(lazy:)
282282 end
283283
284284 def stack_trace_depth ( lazy :)
285+ get_depth = -> {
286+ graphql_caller = caller . select { |c | c . include? ( "graphql" ) }
287+ graphql_caller . size
288+ }
289+
285290 if lazy
286- -> { caller . size }
291+ get_depth
287292 else
288- caller . size
293+ get_depth . call
289294 end
290295 end
291296 end
@@ -320,7 +325,6 @@ def self.profile_stack_depth
320325 GRAPHQL
321326
322327 very_lazy_res = StackDepthSchema . execute ( query_str , variables : { lazyThing : true , lazyStackTrace : true } )
323- pp very_lazy_res
324328 lazy_res = StackDepthSchema . execute ( query_str , variables : { lazyThing : true , lazyStackTrace : false } )
325329 eager_res = StackDepthSchema . execute ( query_str , variables : { lazyThing : false , lazyStackTrace : false } )
326330 get_depth = -> ( result ) { result [ "data" ] [ "thing" ] [ "thing" ] [ "thing" ] [ "thing" ] [ "thing" ] [ "stackTraceDepth" ] }
You can’t perform that action at this time.
0 commit comments