File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
dd-trace-core/src/test/groovy/datadog/trace/common/metrics Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ class FootprintForkedTest extends DDSpecification {
7373 assert latch. await(30 , SECONDS )
7474
7575 then :
76- def layout = footprint(aggregator, features)
77- layout . totalSize() - baseline. totalSize() <= 10 * 1024 * 1024
76+ def after = footprint(aggregator, features)
77+ after - baseline <= 10 * 1024 * 1024
7878
7979 cleanup :
8080 aggregator. close()
@@ -137,15 +137,17 @@ class FootprintForkedTest extends DDSpecification {
137137 }
138138 }
139139
140-
141- static GraphLayout footprint (Object root , Object ... excludedRootFieldInstance ) {
140+ static long footprint (Object root , Object ... excludedRootFieldInstance ) {
142141 GraphLayout layout = GraphLayout . parseInstance(root)
142+ def size = layout. totalSize()
143143
144144 excludedRootFieldInstance. each {
145- layout = layout. subtract(GraphLayout . parseInstance(it))
145+ def excludedLayout = GraphLayout . parseInstance(it)
146+ layout = layout. subtract(excludedLayout)
147+ size - = excludedLayout. totalSize()
146148 }
147149
148- println layout. toFootprint()
149- return layout
150+ println ( layout. toFootprint() )
151+ return size
150152 }
151153}
You can’t perform that action at this time.
0 commit comments