本文整理汇总了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());
}
示例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();
}
示例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());
}
示例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());
}
示例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());
}
示例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") ;
}
示例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();
}
示例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();
}
}
示例9: CounterPrinter
import com.neverwinterdp.util.text.TabularFormater; //导入方法依赖的package包/类
public CounterPrinter() {
tformater = new TabularFormater("Name", "Count") ;
tformater.setTitle("Counter") ;
}