Examples of StrTable


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

Examples of l2p.util.StrTable

    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

Examples of l2p.util.StrTable

    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

Examples of l2p.util.StrTable

    }
  }

  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

Examples of l2p.util.StrTable

    }
  }

  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

Examples of lineage2.commons.text.StrTable

   * Method getStats.
   * @return StrTable
   */
  public static StrTable getStats()
  {
    StrTable table = new StrTable("PathFind Buffers Stats");
    lock.lock();
    try
    {
      long totalUses = 0, totalPlayable = 0, totalTime = 0;
      int index = 0;
      int count;
      long uses;
      long playable;
      long itrs;
      long success;
      long overtime;
      long time;
      for (int size : sizes)
      {
        index++;
        count = 0;
        uses = 0;
        playable = 0;
        itrs = 0;
        success = 0;
        overtime = 0;
        time = 0;
        for (PathFindBuffer buff : buffers.get(size))
        {
          count++;
          uses += buff.totalUses;
          playable += buff.playableUses;
          success += buff.successUses;
          overtime += buff.overtimeUses;
          time += buff.totalTime / 1000000;
          itrs += buff.totalItr;
        }
        totalUses += uses;
        totalPlayable += playable;
        totalTime += time;
        table.set(index, "Size", size);
        table.set(index, "Count", count);
        table.set(index, "Uses (success%)", uses + "(" + String.format("%2.2f", (uses > 0) ? (success * 100.) / uses : 0) + "%)");
        table.set(index, "Uses, playble", playable + "(" + String.format("%2.2f", (uses > 0) ? (playable * 100.) / uses : 0) + "%)");
        table.set(index, "Uses, overtime", overtime + "(" + String.format("%2.2f", (uses > 0) ? (overtime * 100.) / uses : 0) + "%)");
        table.set(index, "Iter., avg", (uses > 0) ? itrs / uses : 0);
        table.set(index, "Time, avg (ms)", String.format("%1.3f", (uses > 0) ? (double) time / uses : 0.));
      }
      table.addTitle("Uses, total / playable  : " + totalUses + " / " + totalPlayable);
      table.addTitle("Uses, total time / avg (ms) : " + totalTime + " / " + String.format("%1.3f", totalUses > 0 ? (double) totalTime / totalUses : 0));
    }
    finally
    {
      lock.unlock();
    }
View Full Code Here

Examples of lineage2.commons.text.StrTable

   * Method getStats.
   * @return StrTable
   */
  public static StrTable getStats()
  {
    StrTable table = new StrTable("L2 Objects Storage Stats");
    GameObjectArray<?> 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
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.