Package com.higherfrequencytrading.chronicle

Examples of com.higherfrequencytrading.chronicle.Excerpt.finish()


                    assertEquals('R', type);
                int n = excerpt2.readInt();
                if (i2 != n)
                    assertEquals(i2, n);
                excerpt2.readShort();
                excerpt2.finish();
                i2++;
            }
        }

        for (; i2 < RUNS; i2++) {
View Full Code Here


            if ('R' != type)
                assertEquals('R', type);
            int n = excerpt2.readInt();
            if (i2 != n)
                assertEquals(i2, n);
            excerpt2.finish();
        }

        t.join();
        long time = System.nanoTime() - start;
        tsc.close();
View Full Code Here

                        excerpt.finish();

                        excerpt2.startExcerpt(6);
                        excerpt2.writeChar('R');
                        excerpt2.writeInt(n);
                        excerpt2.finish();
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                } finally {
                    al2.release();
View Full Code Here

                if ('R' != type)
                    assertEquals('R', type);
                int n = excerpt2.readInt();
                if (i2 != n)
                    assertEquals(i2, n);
                excerpt2.finish();
                i2++;
            }
        }

        for (; i2 < RUNS; i2++) {
View Full Code Here

            if ('R' != type)
                assertEquals('R', type);
            int n = excerpt2.readInt();
            if (i2 != n)
                assertEquals(i2, n);
            excerpt2.finish();
        }

        t.join();
        tsc.close();
        tsc2.close();
View Full Code Here

        t.printStackTrace(pw);
        String text = sw.toString();
        Excerpt excerpt = startExceprt(2 + message.length() + 2 + text.length(), 'X');
        excerpt.writeUTF(message);
        excerpt.writeUTF(text);
        excerpt.finish();
    }

    @NotNull
    public Excerpt startExceprt(int capacity, char type) {
        excerpt.startExcerpt(HEADER_LENGTH + capacity);
View Full Code Here

                    if (socket.read(bb) < 0)
                        return outboundReader.readEntry();
                    bb.flip();
                    Excerpt excerpt = inboundWriter.startExceprt(bb.remaining(), 'I');
                    excerpt.write(bb);
                    excerpt.finish();
                    break;
            }
        } catch (IOException e) {
            inboundWriter.onException("Failed while " + state, e);
            state = State.PAUSING;
View Full Code Here

                    long took = System.nanoTime() - next;
                    if (i >= WARMUP)
                        histo.sample(took);
                    else
                        warmup.sample(took);
                    excerpt.finish();
                }

                StringBuilder heading = new StringBuilder("runs\trate\twarmup");
                StringBuilder values = new StringBuilder(RUNS + "\t" + RATE + "\t" + WARMUP);
                for (double perc : new double[]{50, 90, 99, 99.9, 99.99, 99.999}) {
View Full Code Here

            excerpt.writeLong(System.nanoTime());
            excerpt.writeInt(consolidates.length);
            for (final int consolidate : consolidates) {
                excerpt.writeInt(consolidate);
            }
            excerpt.finish();
        }

        long[] times = new long[repeats];
        int[] nbcs = new int[repeats];
        int count = 0;
View Full Code Here

            final int nbConsolidates = excerpt2.readInt();
            nbcs[count] = nbConsolidates;
            for (int i = 0; i < nbConsolidates; i++) {
                excerpt2.readInt();
            }
            excerpt2.finish();
            count++;
        }
        for (int i = 0; i < count; i++) {
            System.out.print("latency: " + times[i] / repeats / 1e3 + " us average, ");
            System.out.println("nbConsolidates: " + nbcs[i]);
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.