当前位置: 首页>>代码示例>>Java>>正文


Java TabularFormater.setTitle方法代码示例

本文整理汇总了Java中com.neverwinterdp.util.text.TabularFormater.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java TabularFormater.setTitle方法的具体用法?Java TabularFormater.setTitle怎么用?Java TabularFormater.setTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.neverwinterdp.util.text.TabularFormater的用法示例。


在下文中一共展示了TabularFormater.setTitle方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: print

import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
public void print(Monitor monitor) {
  String[] header = { 
    "Method", "Count", "Response", "ClientLimitTimeout", "Timeout", "CloseChannelException", "ConnectionTimeoutException", "Unknown Error" 
  };
  TabularFormater formater = new TabularFormater(header);
  formater.setTitle("DemandSpike Monitor");
  for (MethodMonitor sel : monitor.getRequestMonitors()) {
    formater.addRow(
        sel.getMethod(),
        sel.getCount(),
        sel.getResponseCount(),
        sel.getClientLimitTimeoutCount(),
        sel.getTimeoutExceptionCount(),
        sel.getCloseChannelExceptionCount(),
        sel.getConnectionTimeoutExceptionCount(),
        sel.getUnknownErrorCount()
    );
  }
  System.out.println(formater.getFormatText());
}
 
开发者ID:DemandCube,项目名称:DemandSpike,代码行数:21,代码来源:MonitorPrinter.java

示例2: format

import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
static public String format(String title, List<VMDescriptor> descriptors) throws Exception {
  TabularFormater formater = new TabularFormater("ID", "Path", "Roles", "Cores", "Memory");
  formater.setIndent("  ");
  for(int i = 0; i < descriptors.size(); i++) {
    VMDescriptor descriptor = descriptors.get(i) ;
    formater.addRow(
        descriptor.getId(), 
        descriptor.getStoredPath(),
        StringUtil.join(descriptor.getVmConfig().getRoles(), ","),
        descriptor.getCpuCores(),
        descriptor.getMemory()
    );
  }
  formater.setTitle(title);
  return formater.getFormatText();
}
 
开发者ID:DemandCube,项目名称:Scribengin,代码行数:17,代码来源:VMFormater.java

示例3: report

import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
public void report(Appendable out) throws IOException {
  String[] header = { "Name", "Value" };

  TabularFormater reportFormater = new TabularFormater(header);
  reportFormater.setTitle("Dataflow Test Report ");
  reportFormater.addRow("Source", sourceGeneratorReport.getSourceName());
  reportFormater.addRow("    Number Of Streams", sourceGeneratorReport.getNumberOfStreams());
  reportFormater.addRow("    Write Count", sourceGeneratorReport.getWriteCount());
  reportFormater.addRow("    Duration", sourceGeneratorReport.getDuration() + "ms");
  
  reportFormater.addRow("Sink",   sinkValidatorReport.getSinkName());
  reportFormater.addRow("    Number Of Streams",   sinkValidatorReport.getNumberOfStreams());
  reportFormater.addRow("    Read",   sinkValidatorReport.getReadCount());
  reportFormater.addRow("    Duration",   sinkValidatorReport.getDuration() + "ms");
  out.append("\n");
  out.append(reportFormater.getFormatText());
}
 
开发者ID:DemandCube,项目名称:Scribengin,代码行数:18,代码来源:DataflowTestReport.java

示例4: dump

import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
public void dump(Appendable out, String title) throws IOException {
  String[] header = {
      "From", "To", "In Sequence", "Duplication"
  };
  TabularFormater formater = new TabularFormater(header);
  formater.setTitle(title);
  SequenceMap prevSeqMap = null;
  for (int i = 0; i < map.size(); i++) {
    SequenceMap seqMap = map.get(i);
    boolean inSequence = true;
    if (prevSeqMap != null) {
      inSequence = prevSeqMap.getCurrent() + 1 == seqMap.getFrom();
    }
    Object[] cells = {
        seqMap.getFrom(), seqMap.getCurrent(), inSequence, seqMap.getDuplicatedDescription()
    };
    formater.addRow(cells);
    prevSeqMap = seqMap;
  }
  out.append(formater.getFormatText());
}
 
开发者ID:DemandCube,项目名称:Scribengin,代码行数:22,代码来源:PartitionMessageTracker.java

示例5: info

import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
private void info(List<PartitionMetadata> holder) {
  String[] header = { 
      "Partition Id", "Leader", "Replicas"
  };
  TabularFormater formater = new TabularFormater(header);
  formater.setTitle("Partitions");
  for(PartitionMetadata sel : holder) {
    StringBuilder replicas = new StringBuilder();
    for(Broker broker : sel.replicas()) {
      if(replicas.length() > 0) replicas.append(",");
      replicas.append(broker.port());
    }
    formater.addRow(sel.partitionId(), sel.leader().port(), replicas.toString());
  }
  System.out.println(formater.getFormatText());
}
 
开发者ID:DemandCube,项目名称:Scribengin,代码行数:17,代码来源:KafkaProducerPartitionLeaderChangeBugUnitTest.java

示例6: TimerPrinter

import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
public TimerPrinter() { 
  tformater = new TabularFormater(
      "Name", "Count",
      "Min", "Max", "Mean", "Std Dev",
      "75%", "90%", "95%", "99%", "99.999",
      "1 Min", "5 Min", "15 Min", "M Rate"
  ) ;
  tformater.setTitle("Timer") ;
}
 
开发者ID:DemandCube,项目名称:NeverwinterDP-Commons,代码行数:10,代码来源:MetricPrinter.java

示例7: format

import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
public String format(String title, String ident) {
  TabularFormater formater = new TabularFormater("Name", "App Home", "Workers", "Executor Per Worker");
  formater.setIndent("  ");
  for (int i = 0; i < descriptors.size(); i++) {
    DataflowDescriptor descriptor = descriptors.get(i);
    formater.addRow(
        descriptor.getName(),
        descriptor.getDataflowAppHome(),
        descriptor.getNumberOfWorkers(),
        descriptor.getNumberOfExecutorsPerWorker()
        );
  }
  formater.setTitle(title);
  return formater.getFormatText();
}
 
开发者ID:DemandCube,项目名称:Scribengin,代码行数:16,代码来源:Formater.java

示例8: print

import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
public void print(Appendable out, String title) {
  TabularFormater formater = new TabularFormater("Partition", "Read");
  formater.setTitle(title + "(" + totalMessages + ")");

  formater.setIndent("  ");
  for (Map.Entry<Integer, Integer> entry : counters.entrySet()) {
    formater.addRow(entry.getKey(), entry.getValue());
  }

  try {
    out.append(formater.getFormatText()).append("\n");
  } catch (IOException e) {
    e.printStackTrace();
  }
}
 
开发者ID:DemandCube,项目名称:Scribengin,代码行数:16,代码来源:KafkaMessageCheckTool.java

示例9: CounterPrinter

import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
public CounterPrinter() { 
  tformater = new TabularFormater("Name", "Count") ;
  tformater.setTitle("Counter") ;
}
 
开发者ID:DemandCube,项目名称:NeverwinterDP-Commons,代码行数:5,代码来源:MetricPrinter.java


注:本文中的com.neverwinterdp.util.text.TabularFormater.setTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。