Package l2p.util

Examples of l2p.util.StrTable


        TreeMap<Long, L2NpcInstance> map = new TreeMap<Long, L2NpcInstance>();
        for(L2NpcInstance npc : L2ObjectsStorage.getAllNpcsForIterate())
        {
          map.put(show_count ? npc.pathfindCount : npc.pathfindTime, npc);
        }
        StrTable table = new StrTable("PathFind Top");
        int count = 0;
        for(Entry<Long, L2NpcInstance> entry : map.descendingMap().entrySet())
        {
          //table.set(count, "ObjId", entry.getValue().getObjectId());
          table.set(count, "Time", entry.getValue().pathfindTime);
          table.set(count, "Count", entry.getValue().pathfindCount);
          //table.set(count, "Name", entry.getValue().getName());
          table.set(count, "AI", entry.getValue().getAI());
          count++;
          if(count > maxCount)
          {
            break;
          }
        }
        AdminHelpPage.showHelpHtml(activeChar, table.toL2Html());
        break;
    }
    return true;
  }
View Full Code Here


    UNHANDLED_SOCKET_TTL = UnhandledSocketsMinTTL;
  }
 
  public static StrTable getStats()
  {
    StrTable table = new StrTable("Selector Thread Stats");
    table.set(0, "Writed Count", statWrited);
    table.set(0, "Compressed", Util.formatSize(statWritedCompressed));
    table.set(0, "Uncompressed", Util.formatSize(statWriteUncompressed));
    table.set(0, "Ratio", String.format("%.2f%%", 100.0 * statWritedCompressed / statWriteUncompressed));
    return table;
  }
View Full Code Here

    return (int) storedId;
  }

  public static StrTable getStats()
  {
    StrTable table = new StrTable("L2 Objects Storage Stats");
    L2ObjectArray<?> storage;
    for(int i = 0; i < storages.length; i++)
    {
      if((storage = storages[i]) == null)
      {
        continue;
      }
      synchronized(storage)
      {
        table.set(i, "Name", storage.name);
        table.set(i, "Size / Real", storage.size() + " / " + storage.getRealSize());
        table.set(i, "Capacity / init", storage.capacity() + " / " + storage.initCapacity);
      }
    }
    return table;
  }
View Full Code Here

    }
  }

  public static StrTable getGCStats()
  {
    StrTable table = new StrTable("Garbage Collectors Stats");
    int i = 0;
    for(GarbageCollectorMXBean gc_bean : ManagementFactory.getGarbageCollectorMXBeans())
    {
      table.set(i, "Name", gc_bean.getName());
      table.set(i, "ColCount", gc_bean.getCollectionCount());
      table.set(i, "ColTime", gc_bean.getCollectionTime());
      i++;
    }
    return table;
  }
View Full Code Here

    }
  }

  public static StrTable getStats()
  {
    StrTable table = new StrTable("PathFind Buffers Stats");
    long inUse, pathFindsTotal = 0, pathFindsPlayable = 0;
    double allTimeMillis = 0;
    for(BufferInfo buff : all_buffers)
    {
      pathFindsTotal += buff.totalUses;
      pathFindsPlayable += buff.playableUses;
      allTimeMillis += buff.useTimeMillis;
      inUse = 0;
      synchronized(buff)
      {
        for(PathFindBuffer b : buff.buffers)
        {
          if(b.inUse)
          {
            inUse++;
          }
        }
      }
      table.set(buff.index, "Size", buff.MapSize);
      table.set(buff.index, "Use", inUse);
      table.set(buff.index, "Uses", buff.totalUses);
      table.set(buff.index, "Alloc", buff.buffers.size() + " of " + buff.buffers.getCapacity());
      table.set(buff.index, "unbuf", buff.overBuffers);
      if(buff.totalUses > 0)
      {
        table.set(buff.index, "Avg ms", String.format("%1.3f", buff.useTimeMillis / buff.totalUses));
      }
    }
    table.addTitle("Total / Playable  : " + pathFindsTotal + " / " + pathFindsPlayable);
    table.addTitle("Total(s) / Avg(ms): " + String.format("%1.2f", allTimeMillis / 1000) + " / " + String.format("%1.3f", allTimeMillis / pathFindsTotal));
    return table;
  }
View Full Code Here

TOP

Related Classes of l2p.util.StrTable

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.