File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
dd-trace-core/src/test/groovy/datadog/trace/common/metrics Expand file tree Collapse file tree 1 file changed +10
-6
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()
@@ -138,14 +138,18 @@ class FootprintForkedTest extends DDSpecification {
138138 }
139139
140140
141- static GraphLayout footprint (Object root , Object ... excludedRootFieldInstance ) {
141+ static long footprint (Object root , Object ... excludedRootFieldInstance ) {
142142 GraphLayout layout = GraphLayout . parseInstance(root)
143+ def size = layout. totalSize()
144+
143145
144146 excludedRootFieldInstance. each {
145- layout = layout. subtract(GraphLayout . parseInstance(it))
147+ def excludedLayout = GraphLayout . parseInstance(it)
148+ layout = layout. subtract(excludedLayout)
149+ size - = excludedLayout. totalSize()
146150 }
147151
148- println layout. toFootprint()
149- return layout
152+ System . err . println ( layout. toFootprint() )
153+ return size
150154 }
151155}
You can’t perform that action at this time.
0 commit comments