@@ -0,0 +1,2313 @@
+/*%0A *      Copyright (C) 2015  higherfrequencytrading.com%0A *%0A *      This program is free software: you can redistribute it and/or modify%0A *      it under the terms of the GNU Lesser General Public License as published by%0A *      the Free Software Foundation, either version 3 of the License.%0A *%0A *      This program is distributed in the hope that it will be useful,%0A *      but WITHOUT ANY WARRANTY; without even the implied warranty of%0A *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A *      GNU Lesser General Public License for more details.%0A *%0A *      You should have received a copy of the GNU Lesser General Public License%0A *      along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0Apackage net.openhft.chronicle.map;%0A%0Aimport net.openhft.chronicle.core.values.LongValue;%0Aimport net.openhft.chronicle.values.Values;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport static net.openhft.chronicle.algo.MemoryUnit.BYTES;%0Aimport static net.openhft.chronicle.algo.MemoryUnit.MEGABYTES;%0A%0Apublic class VinceTest %7B%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        long count = 100_000_000L;%0A        File f = File.createTempFile(%22vince%22, %22.map%22);%0A        f.deleteOnExit();%0A        try (ChronicleMap%3CCharSequence, LongValue%3E catalog = ChronicleMap%0A                .of(CharSequence.class, LongValue.class)%0A                .entries(count)%0A                .averageKey(%22100000000%22)%0A                .putReturnsNull(true)%0A                .createPersistedTo(f)) %7B%0A%0A            long prev = System.currentTimeMillis();%0A%0A            StringBuilder key = new StringBuilder();%0A            LongValue value = Values.newHeapInstance(LongValue.class);%0A%0A            for (long i = 1; i %3C= count; i++) %7B%0A                key.setLength(0);%0A                key.append(i);%0A                value.setValue(i);%0A                catalog.put(key, value);%0A                if ((i %25 1_000_000) == 0) %7B%0A                    long now = System.currentTimeMillis();%0A                    System.out.printf(%22Average ns to insert per mi #%25d: %25d%5Cn%22,%0A                            (i / 1_000_000), now - prev);%0A                    prev = now;%0A                %7D%0A            %7D%0A            System.out.println(%22file size %22 + MEGABYTES.convert(f.length(), BYTES) + %22 MB%22);%0A        %7D%0A    %7D%0A%7D%0A

Check in VinceTest