Examples of nextInt()


Examples of java.util.Random.nextInt()

        int timeMax = getSize(500, 2000);
        Random rand = new Random(1);
        for (int i = 0; timeMulti < timeMax; i++) {
            int size = rand.nextInt(max / 10);
            int minX = rand.nextInt(max - size);
            int minY = rand.nextInt(max - size);
            int maxX = minX + size, maxY = minY + size;
            time = System.currentTimeMillis();
            ResultSet rs1 = multi.getResult(prepMulti, new int[] { minX, minY }, new int[] { maxX, maxY });
            timeMulti += System.currentTimeMillis() - time;
            time = System.currentTimeMillis();
View Full Code Here

Examples of java.util.Random.nextInt()

        PreparedStatement prepMulti = conn.prepareStatement(sql);
        long timeMulti = 0, timeRegular = 0;
        int timeMax = getSize(500, 2000);
        Random rand = new Random(1);
        for (int i = 0; timeMulti < timeMax; i++) {
            int size = rand.nextInt(max / 10);
            int minX = rand.nextInt(max - size);
            int minY = rand.nextInt(max - size);
            int minZ = rand.nextInt(max - size);
            int maxX = minX + size, maxY = minY + size, maxZ = minZ + size;
            time = System.currentTimeMillis();
View Full Code Here

Examples of java.util.Random.nextInt()

        long timeMulti = 0, timeRegular = 0;
        int timeMax = getSize(500, 2000);
        Random rand = new Random(1);
        for (int i = 0; timeMulti < timeMax; i++) {
            int size = rand.nextInt(max / 10);
            int minX = rand.nextInt(max - size);
            int minY = rand.nextInt(max - size);
            int minZ = rand.nextInt(max - size);
            int maxX = minX + size, maxY = minY + size, maxZ = minZ + size;
            time = System.currentTimeMillis();
            ResultSet rs1 = multi.getResult(prepMulti, new int[] { minX, minY, minZ }, new int[] { maxX, maxY, maxZ });
View Full Code Here

Examples of java.util.Random.nextInt()

        int timeMax = getSize(500, 2000);
        Random rand = new Random(1);
        for (int i = 0; timeMulti < timeMax; i++) {
            int size = rand.nextInt(max / 10);
            int minX = rand.nextInt(max - size);
            int minY = rand.nextInt(max - size);
            int minZ = rand.nextInt(max - size);
            int maxX = minX + size, maxY = minY + size, maxZ = minZ + size;
            time = System.currentTimeMillis();
            ResultSet rs1 = multi.getResult(prepMulti, new int[] { minX, minY, minZ }, new int[] { maxX, maxY, maxZ });
            timeMulti += System.currentTimeMillis() - time;
View Full Code Here

Examples of java.util.Random.nextInt()

        Random rand = new Random(1);
        for (int i = 0; timeMulti < timeMax; i++) {
            int size = rand.nextInt(max / 10);
            int minX = rand.nextInt(max - size);
            int minY = rand.nextInt(max - size);
            int minZ = rand.nextInt(max - size);
            int maxX = minX + size, maxY = minY + size, maxZ = minZ + size;
            time = System.currentTimeMillis();
            ResultSet rs1 = multi.getResult(prepMulti, new int[] { minX, minY, minZ }, new int[] { maxX, maxY, maxZ });
            timeMulti += System.currentTimeMillis() - time;
            time = System.currentTimeMillis();
View Full Code Here

Examples of java.util.Random.nextInt()

        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
        DataOutputStream data = new DataOutputStream(out);
        Random rand = new Random(22222);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 1000; i++) {
                data.writeInt(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }
View Full Code Here

Examples of java.util.Random.nextInt()

        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
        DataOutputStream data = new DataOutputStream(out);
        Random rand = new Random(44444);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 10000; i++) {
                data.writeInt(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }
View Full Code Here

Examples of java.util.Random.nextInt()

        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
        DataOutputStream data = new DataOutputStream(out);
        Random rand = new Random(22222);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 1000; i++) {
                data.writeInt(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }
View Full Code Here

Examples of java.util.Random.nextInt()

        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
        DataOutputStream data = new DataOutputStream(out);
        Random rand = new Random(22222);
        for(int times = 0; times < 10; times++) {
            for(int i = 0; i < 2048; i++) {
                data.writeChar(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }
View Full Code Here

Examples of java.util.Random.nextInt()

        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
        DataOutputStream data = new DataOutputStream(out);
        Random rand = new Random(22222);
        for(int times = 0; times < 10; times++) {
            for(int i = 0; i < 4096; i++) {
                data.writeChar(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.