private void verify_depth_after_calling_UpdateTree(uint numFunctionIds)
        {
            ThreadProfilingBucket bucket = new ThreadProfilingBucket(new MockThreadProfilingService());
            var fids = GenerateStackSnapshot(numFunctionIds, 200, 50);

            bucket.UpdateTree(fids);
            Assert.AreEqual(fids.Count(), bucket.GetDepth());
        }
        private void verify_depth_after_multiple__identical_calls_to_UpdateTree(int numCalls, int numFunctionIds)
        {
            // This function verifies that the depth hasn't been changed when identical stacks are added to the tree.

            ThreadProfilingBucket bucket = new ThreadProfilingBucket(new MockThreadProfilingService());
            var fids = GenerateStackSnapshot(10, 200, 50);

            // Use the exact same stack information to update tree multiple times.
            // This should result in the tree's depth not changing after the first call.
            for (int i = 0; i < numCalls; i++)
            {
                bucket.UpdateTree(fids);
            }

            Assert.AreEqual(fids.Count(), bucket.GetDepth());
        }