leerho commented on code in PR #651: URL: https://github.com/apache/datasketches-java/pull/651#discussion_r1968761073
########## src/test/java/org/apache/datasketches/hll/SizeAndModeTransitions.java: ########## @@ -0,0 +1,103 @@ +/* + * 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.datasketches.hll; + +import static org.testng.Assert.assertEquals; + +import org.apache.datasketches.memory.WritableMemory; +import org.testng.annotations.Test; + +public class SizeAndModeTransitions { + static String hfmt = "%6s %7s %4s %10s %5s %10s %10s %10s %10s %10s %14s\n"; + static String dfmt = "%6s %7s %4d %,10d %5s %,10d %,10d %,10d %,10d %,10d %,14.3f\n"; + static String[] hdr = {"Type", "Store", "LgK", "N", "Mode", "ActCBytes", "CmpBytes", "ActUBytes", "UpdBytes", "MaxBytes", "Estimate"}; + + @Test + public void checkHLL8Heap() { + TgtHllType tgtHllType = TgtHllType.HLL_8; + boolean direct = false; + int lgK = 10; + int N = 97; + printf(hfmt, (Object[]) hdr); + int maxBytes = HllSketch.getMaxUpdatableSerializationBytes(lgK, tgtHllType); + WritableMemory wmem = null;; + HllSketch sk; + if (direct) { + wmem = WritableMemory.allocate(maxBytes); + sk = new HllSketch(lgK, tgtHllType, wmem); + } else { + sk = new HllSketch(lgK, tgtHllType); + } + String type = tgtHllType.toString(); Review Comment: Already removed. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
