Package com.onpositive.traps

Examples of com.onpositive.traps.CallStorageV1


    DataInputStream di = new DataInputStream(stream);

    length = di.readInt();
    int v1 = di.readInt();
    if (v1 == 1) {
      storage = new CallStorageV1(di);
      long readLong = di.readLong();
      int readInt = di.readInt();
      for (int a = 0; a < readInt; a++) {
        CallStackHandler handler = new CallStackHandler(di);
        handler.apply(storage, readLong);
View Full Code Here


    dataStoreInfo = (DataStoreCallStorageAttachment) storage
        .getAttachment(DataStoreCallStorageAttachment.class);
    memCacheInfo = (MemCacheStorageAttachment) storage
        .getAttachment(MemCacheStorageAttachment.class);
    final IdentityHashMap<CallEntry, AccumulatedMethod> ps = new IdentityHashMap<CallEntry, AccumulatedMethod>();
    storage.iterate(new StorageIterator() {

      public void accept(int from, int to, int index, int[] values) {
        if (to == 0) {
          CallEntry root = null;
          if (from > Integer.MAX_VALUE / 2) {
            root = jsp[Integer.MAX_VALUE - from];
          } else {
            if(from -1 > dictionary.length -1){
              return;
            }
            root = dictionary[from - 1];
          }
          AccumulatedMethod accumulatedMethod = new AccumulatedMethod(
              root);
          accumulatedMethod.count = values[index];
          accumulatedMethod.time = values[index + 1];
          accumulatedMethod.apicpuTime = values[index + 2];
          roots.add(accumulatedMethod);
        } else {
          CallEntry entry = null;
          if (from > Integer.MAX_VALUE / 2) {
            entry = jsp[Integer.MAX_VALUE - from];
          } else {
            if(from -1 > dictionary.length -1){
              return;
            }
            entry = dictionary[from - 1];
          }
          AccumulatedMethod accumulatedMethod = ps.get(entry);
          if (accumulatedMethod == null) {
            AccumulatedMethod m = new AccumulatedMethod(entry);
            accumulatedMethod = m;
            methods.add(m);
            ps.put(entry, m);
          }
          accumulatedMethod.count += values[index];
          accumulatedMethod.time += values[index + 1];
          accumulatedMethod.selftime += values[index + 1];
          accumulatedMethod.apicpuTime = values[index + 2];
        }
      }
    });
    storage.iterate(new StorageIterator() {

      public void accept(int from, int to, int index, int[] values) {
        if (to == 0) {

        } else {
View Full Code Here

    return roots.toArray(new ITrace[roots.size()]);
  }

  public Object[] getCalles(final AccumulatedMethod ma) {
    final IdentityHashMap<CallEntry, AccumulatedMethod> mz = new IdentityHashMap<CallEntry, AccumulatedMethod>();
    storage.iterate(new StorageIterator() {

      public void accept(int from, int to, int index, int[] values) {

        if (to != 0) {
          CallEntry entry = null;
          if (to > Integer.MAX_VALUE/2) {
            entry = jsp[Integer.MAX_VALUE - to];
          } else {
            if(to -1 > dictionary.length -1){
              return;
            }
            entry = dictionary[to - 1];
          }
          if (isFrom(ma, entry)) {
            AccumulatedMethod m = new AccumulatedMethod(
                dictionary[from - 1]);
            mz.put(dictionary[from - 1], m);
            m.count += values[index];
            m.time += values[index + 1];
            m.selftime += values[index + 1];
            m.apicpuTime += values[index + 2];
          }
        }
      }
    });
    storage.iterate(new StorageIterator() {

      public void accept(int from, int to, int index, int[] values) {
        if (to != 0) {
          CallEntry entry = null;
          if (to > Integer.MAX_VALUE/2) {
View Full Code Here

TOP

Related Classes of com.onpositive.traps.CallStorageV1

Copyright © 2018 www.massapicom. 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.