/* * Copyright 2014 Higher Frequency Trading * * http://www.higherfrequencytrading.com * * Licensed 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 net.openhft.chronicle.map; import net.openhft.affinity.AffinityLock; import net.openhft.lang.model.DataValueClasses; import net.openhft.lang.values.LongValue; import java.io.File; import java.io.IOException; import static org.junit.Assert.assertNotNull; /** * Created by peter on 28/02/14. *
* For 1M entries * run 1 1000000 : 50/90/99/99.9/99.99/worst: 1.0/3.2/14/18/116/172 * run 1 500000 : 50/90/99/99.9/99.99/worst: 0.2/3.0/11/16/45/163 * run 1 250000 : 50/90/99/99.9/99.99/worst: 0.2/3.0/10/16/20/155 * run 1 100000 : 50/90/99/99.9/99.99/worst: 0.2/3.0/9.2/15/20/147 * run 1 50000 : 50/90/99/99.9/99.99/worst: 0.2/3.0/9.2/15/20/139 *
* For 1M entries to ext4 on laptop with SSD * run 1 2,000,000 : 50/90/99/99.9/99.99/worst : 0.2 / 0.7 / 8.7 / 15 / 60 / 129 micro-seconds. * run 1 1,000,000 : 50/90/99/99.9/99.99/worst : 0.2 / 0.5 / 6.6 / 10 / 15 / 43 micro-seconds. * run 1 500,000 : 50/90/99/99.9/99.99/worst : 0.2 / 0.5 / 5.6 / 10 / 15 / 53 micro-seconds. *
* For 1M entries on server to ext4 with PCI-SSD * run 1 1000000 : 50/90/99/99.9/99.99/worst: 0.9/3.2/14/18/106/188 * run 1 500000 : 50/90/99/99.9/99.99/worst: 0.2/3.0/11/16/46/172 * run 1 250000 : 50/90/99/99.9/99.99/worst: 0.2/3.0/10/16/20/163 * run 1 100000 : 50/90/99/99.9/99.99/worst: 0.2/3.0/9.9/15/20/163 * run 1 50000 : 50/90/99/99.9/99.99/worst: 0.2/3.0/9.9/15/20/147 *
* For 10M entries * run 1 1000000 : 50/90/99/99.9/99.99/worst: 1.4/6.2/16/34/135/180 * run 1 500000 : 50/90/99/99.9/99.99/worst: 0.3/3.1/11/17/54/159 * run 1 250000 : 50/90/99/99.9/99.99/worst: 0.3/3.0/10/15/21/147 * run 1 100000 : 50/90/99/99.9/99.99/worst: 0.4/3.2/9.7/15/20/151 * run 1 50000 : 50/90/99/99.9/99.99/worst: 0.4/3.2/9.4/15/20/147 *
* For 100M entries * run 1 1000000 : 50/90/99/99.9/99.99/worst: 570425/2818572/3355443/3422552/3489660/3556769 * run 1 500000 : 50/90/99/99.9/99.99/worst: 1.1/11/27/43/94/184 * run 1 250000 : 50/90/99/99.9/99.99/worst: 0.7/3.3/12/19/40/167 * run 1 100000 : 50/90/99/99.9/99.99/worst: 0.7/3.3/10/16/21/151 * run 1 50000 : 50/90/99/99.9/99.99/worst: 0.7/3.3/10/16/22/155 **/ public class CHMLatencyTestMain { static final int KEYS = 1000 * 1000; static final int RUN_TIME = 30; static final long START_TIME = System.currentTimeMillis(); // TODO test passes but is under development. public static void main(String... ignored) throws IOException { AffinityLock lock = AffinityLock.acquireCore(); File file = File.createTempFile("testCHMLatency", "deleteme"); // File file = new File("testCHMLatency.deleteme"); file.delete(); ChronicleMap