Examples of TableFormatter


Examples of de.willuhn.jameica.gui.formatter.TableFormatter

  public ProtokollList(Konto konto, Action action)
  {
    super(action);
    this.konto = konto;
   
    this.setFormatter(new TableFormatter()
    {
      public void format(TableItem item)
      {
        Protokoll p = (Protokoll) item.getData();
        if (p == null)
View Full Code Here

Examples of de.willuhn.jameica.gui.formatter.TableFormatter

  public NachrichtList(GenericIterator list, Action action)
  {
    super(list,action);
    this.setMulti(true);
    this.i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();
    setFormatter(new TableFormatter()
    {
      public void format(TableItem item)
      {
        if (item == null || item.getData() == null)
          return;
View Full Code Here

Examples of de.willuhn.jameica.gui.formatter.TableFormatter

      this.umsaetze = new ArrayList();
   
    this.addFeature(new FeatureShortcut()); // Wir unterstuetzen Shortcuts
   
    setMulti(true);
    setFormatter(new TableFormatter()
    {
      public void format(TableItem item)
      {
        Umsatz u = (Umsatz) item.getData();
        if (u == null) return;
View Full Code Here

Examples of nallar.tickthreading.util.TableFormatter

  public static void profile(final ICommandSender commandSender, int seconds) {
    final UtilisationProfiler contentionProfiler = new UtilisationProfiler(seconds);
    contentionProfiler.run(new Runnable() {
      @Override
      public void run() {
        TableFormatter tf = new TableFormatter(commandSender);
        contentionProfiler.dump(tf, commandSender instanceof MinecraftServer ? 15 : 6);
        Command.sendChat(commandSender, tf.toString());
      }
    });
  }
View Full Code Here

Examples of nallar.tickthreading.util.TableFormatter

      public void run() {
        try {
          Thread.sleep(time * 1000);
        } catch (InterruptedException ignored) {
        }
        Command.sendChat(commandSender, writeStats(new TableFormatter(commandSender)).toString());
        synchronized (PacketProfiler.class) {
          size.clear();
          count.clear();
          profiling = false;
        }
View Full Code Here

Examples of nallar.tickthreading.util.TableFormatter

            tickRegion = manager.getTileEntityRegion(hashCode);
            if (tickRegion != null) {
              tickRegion.profilingEnabled = false;
            }
          }
          sendChat(commandSender, entityTickProfiler.writeStringData(new TableFormatter(commandSender)).toString());
        }
      }, location ? ProfilingState.CHUNK : ProfilingState.GLOBAL, time, worlds)) {
        sendChat(commandSender, "Someone else is currently profiling.");
      }
      if (location) {
        manager.profilingEnabled = false;
        TickRegion tickRegion = manager.getEntityRegion(hashCode);
        if (tickRegion != null) {
          tickRegion.profilingEnabled = true;
        }
        tickRegion = manager.getTileEntityRegion(hashCode);
        if (tickRegion != null) {
          tickRegion.profilingEnabled = true;
        }
      }
      sendChat(commandSender, "Profiling for " + time + " seconds in " + (world == null ? "all worlds " : Log.name(world)) + (location ? " at chunk coords " + x + ',' + z : ""));
      return;
    }
    if (Timings.enabled) {
      sendChat(commandSender, "Someone else is currently profiling, please wait and try again.");
      return;
    }
    Timings.enabled = true;
    Runnable profilingRunnable = new Runnable() {
      @Override
      public void run() {
        try {
          Thread.sleep(1000 * time);
        } catch (InterruptedException ignored) {
        }
        Timings.enabled = false;
        try {
          Thread.sleep(100 * time);
        } catch (InterruptedException ignored) {
        }
        sendChat(commandSender, String.valueOf(Timings.writeData(new TableFormatter(commandSender))));
        Timings.clear();
      }
    };
    Thread profilingThread = new Thread(profilingRunnable);
    profilingThread.setName("TT Profiler");
View Full Code Here

Examples of nallar.tickthreading.util.TableFormatter

  public static void profile(final ICommandSender commandSender, int seconds, int resolution) {
    final ContentionProfiler contentionProfiler = new ContentionProfiler(seconds, resolution);
    contentionProfiler.run(new Runnable() {
      @Override
      public void run() {
        TableFormatter tf = new TableFormatter(commandSender);
        contentionProfiler.dump(tf, commandSender instanceof MinecraftServer ? 15 : 6);
        Command.sendChat(commandSender, tf.toString());
      }
    });
  }
View Full Code Here

Examples of nallar.tickthreading.util.TableFormatter

      EntityPlayer entityPlayer = event.entityPlayer;
      ItemStack usedItem = entityPlayer.getCurrentEquippedItem();
      if (usedItem != null) {
        Item usedItemType = usedItem.getItem();
        if (usedItemType == Item.pocketSundial && (!requireOpForDumpCommand || entityPlayer.canCommandSenderUseCommand(4, "dump"))) {
          Command.sendChat(entityPlayer, DumpCommand.dump(new TableFormatter(entityPlayer), entityPlayer.worldObj, event.x, event.y, event.z, 35).toString());
          event.setCanceled(true);
        }
      }
    }
  }
View Full Code Here

Examples of nallar.tickthreading.util.TableFormatter

  }

  @Override
  public void processCommand(ICommandSender commandSender, List<String> arguments) {
    StatsHolder statsHolder = new StatsHolder();
    TableFormatter tf = new TableFormatter(commandSender);
    tf.sb.append(VersionUtil.TTVersionString()).append('\n');
    tf
        .heading("")
        .heading("E")
        .heading("TE")
        .heading("C")
        .heading("P")
        .heading("L");
    for (TickManager tickManager : TickThreading.instance.getManagers()) {
      tickManager.writeStats(tf, statsHolder);
    }
    tf
        .row("Overall")
        .row(statsHolder.entities)
        .row(statsHolder.tileEntities)
        .row(statsHolder.chunks)
        .row(MinecraftServer.getServerConfigurationManager(MinecraftServer.getServer()).getCurrentPlayerCount())
        .row(TableFormatter.formatDoubleWithPrecision((MinecraftServer.getTickTime() * 100) / MinecraftServer.getTargetTickTime(), 2) + '%');
    tf.finishTable();
    tf.sb.append('\n').append(getTPSString(commandSender instanceof EntityPlayer));
    sendChat(commandSender, tf.toString());
  }
View Full Code Here

Examples of nallar.tickthreading.util.TableFormatter

      ticks++;
    }
  }

  public void writeJSONData(File file) throws IOException {
    TableFormatter tf = new TableFormatter(StringFiller.FIXED_WIDTH);
    tf.recordTables();
    writeData(tf, 20);
    ObjectMapper objectMapper = new ObjectMapper();
    List<Object> tables = tf.getTables();
    long timeProfiled = System.currentTimeMillis() - startTime;
    float tps = ticks * 1000f / timeProfiled;
    tables.add(0, CollectionsUtil.map(
        "TPS", tps,
        "Load", TableFormatter.formatDoubleWithPrecision((MinecraftServer.getTickTime() * 100) / MinecraftServer.getTargetTickTime(), 2)
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.