dant3 commented on code in PR #7513: URL: https://github.com/apache/ignite-3/pull/7513#discussion_r2764488927
########## modules/page-memory/src/test/java/org/apache/ignite/internal/pagememory/benchmark/ZipfianDistributionTest.java: ########## @@ -0,0 +1,134 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.pagememory.benchmark; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; + +/** + * Tests for {@link ZipfianDistribution}. + */ +class ZipfianDistributionTest { + + @Test + void testZipfianProduces80_20Pattern() { + // 10,000 items with high skew (0.99) should give ~80% accesses to top 20% + int itemCount = 10_000; + double skew = 0.99; + ZipfianDistribution dist = new ZipfianDistribution(itemCount, skew, 42); Review Comment: No, we use fixed seed to reproduce the same distrubution every single time - this helps to get a stable comparison between the runs - that is when you want to actually compare before/after -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
