void () { Disposer.setDebugMode(false); // avoid expensive checks int N = 1_000_000; Disposable root = Disposer.newDisposable("test_root"); Disposable[] children = IntStream.range(0, N).mapToObj(i -> Disposer.newDisposable("child " + i)).toArray(Disposable[]::new); PlatformTestUtil.startPerformanceTest(name.getMethodName(), 15_000, () -> { for (Disposable child : children) { Disposer.register(root, child); } for (Disposable child : children) { Disposer.dispose(child); } }) .setup(() -> { Disposer.dispose(root); Disposer.register(myRoot, root); }) .assertTiming(); }