Examples of startExcerpt()


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

                        excerpt.readChars(sb);
                        excerpt.readLong();
                        excerpt.readDouble();
                        excerpt.finish();

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

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

        Excerpt excerpt = tsc.createExcerpt();

        List objects = Arrays.asList(1, 1L, "one", new Date(1));

        excerpt.startExcerpt(293);
        // a new ObjectOutputStream is required for each record as they are not reusable :(
        ObjectOutputStream coos = new ObjectOutputStream(excerpt.outputStream());
        coos.writeObject(objects);
        coos.close();
View Full Code Here

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

        final Chronicle chronicle = new IntIndexedChronicle(basePath);
        final Excerpt excerpt = chronicle.createExcerpt();
        final int[] consolidates = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
        int repeats = 10000;
        for (int i = 0; i < repeats; i++) {
            excerpt.startExcerpt(8 + 4 + 4 * consolidates.length);
            excerpt.writeLong(System.nanoTime());
            excerpt.writeInt(consolidates.length);
            for (final int consolidate : consolidates) {
                excerpt.writeInt(consolidate);
            }
View Full Code Here

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

        long start = 0;
        for (int i = -warmup; i < rows; i++) {
            if (i == 0)
                start = System.nanoTime();
            record.startExcerpt(256);
            record.writeInt(i + warmup);
            int pos = record.position();
            // field "c"
            record.append(i + warmup); // as text.
            record.write(xs, 0, pos + 120 - record.position());
View Full Code Here

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

                        if (i != n)
                            assertEquals(i, n);
                        excerpt.readChars(sb);
                        excerpt.finish();

                        excerpt2.startExcerpt(8);
                        excerpt2.writeChar('R');
                        excerpt2.writeInt(n);
                        excerpt2.writeShort(-1);
                        excerpt2.finish();
                    }
View Full Code Here

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

                        } while (!excerpt.index(i));

                        long time = excerpt.readLong();
                        excerpt.finish();

                        excerpt2.startExcerpt(8);
                        excerpt2.writeLong(time);
                        excerpt2.finish();
                    }
                } catch (IOException e) {
                    e.printStackTrace();
View Full Code Here

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

        chronicle.useUnsafe(true);
        Excerpt excerpt = chronicle.createExcerpt();
        byte[] bytes = msg.getBytes();
        int runs = 1000000;
        for (int i = 0; i < runs; i++) {
            excerpt.startExcerpt(bytes.length);
            excerpt.write(bytes);
            excerpt.finish();
        }
        excerpt.index(-1);
View Full Code Here

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

        Excerpt excerpt = tsc.createExcerpt();
        double d = 0.001, factor = 1 + 10.0 / count;
        long timeInMS = System.currentTimeMillis() % 86400000;
        for (int i = 0; i < count; i++) {
            d *= factor;
            excerpt.startExcerpt(128);
            excerpt.appendTime(timeInMS).append(" [ ");
            excerpt.append(Thread.currentThread().getName()).append(" ] FINE ");
            excerpt.append("result= ").append(d, 6).append('\n');
            excerpt.finish();
        }
View Full Code Here

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

                        } while (!excerpt.index(i));

                        long time = excerpt.readLong();
                        excerpt.finish();

                        excerpt2.startExcerpt(8);
                        excerpt2.writeLong(time);
                        excerpt2.finish();
                    }
                } catch (IOException e) {
                    e.printStackTrace();
View Full Code Here

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

            sb.setLength(0);
            for (int j = i; j < i + 16; j++) {
                if (Character.isValidCodePoint(j))
                    sb.appendCodePoint(j);
            }
            excerpt.startExcerpt(2 + sb.length() * 3);
            excerpt.writeUTF(sb);
            excerpt.finish();
        }
        excerpt.startExcerpt(2 + 1);
        excerpt.writeUTF(null);
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.