本文整理汇总了Java中j2dbench.report.J2DAnalyzer.ResultHolder.getName方法的典型用法代码示例。如果您正苦于以下问题:Java ResultHolder.getName方法的具体用法?Java ResultHolder.getName怎么用?Java ResultHolder.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类j2dbench.report.J2DAnalyzer.ResultHolder
的用法示例。
在下文中一共展示了ResultHolder.getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printIIOTable
import j2dbench.report.J2DAnalyzer.ResultHolder; //导入方法依赖的package包/类
private static void printIIOTable(String resultsFile) {
try {
J2DAnalyzer.readResults(resultsFile);
} catch (Exception e) {
System.err.println("Error reading results file: " +
e.getMessage());
return;
}
Vector results = J2DAnalyzer.results;
int numsets = results.size();
ResultSetHolder base = (ResultSetHolder)results.elementAt(0);
Enumeration basekeys = base.getKeyEnumeration();
String[] keys = toSortedArray(basekeys, false);
// build results table
for (int k = 0; k < keys.length; k++) {
String key = keys[k];
ResultHolder rh = base.getResultByKey(key);
double score = rh.getScore();
Hashtable opts = rh.getOptions();
String imgsize = (String)opts.get("imageio.opts.size");
String content = (String)opts.get("imageio.opts.content");
String testname = "size=" + imgsize + ",content=" + content;
String format = null;
String method = null;
String name = rh.getName();
if (name.equals("imageio.input.image.imageio.reader.tests.read")) {
format = (String)opts.get("imageio.input.image.imageio.opts.format");
String type = format.substring(0, format.indexOf('-'));
format = format.substring(format.indexOf('-')+1);
if (format.equals("jpeg")) {
format = "jpg";
}
method = "IIO-" + (type.equals("core") ? "Core" : "Ext");
} else if (name.equals("imageio.input.image.toolkit.tests.createImage")) {
format = (String)opts.get("imageio.input.image.toolkit.opts.format");
method = "Toolkit";
} else if (name.equals("imageio.input.image.toolkit.tests.gdkLoadImage")) {
format = (String)opts.get("imageio.input.image.toolkit.opts.format");
method = "GdkPixBuf";
} else if (name.equals("imageio.input.image.jpegcodec.tests.decodeAsBufferedImage")) {
format = "jpg";
method = "JPEGCodec";
} else {
System.err.println("skipping unrecognized key: " + name);
continue;
}
//System.out.println(format + ": " + method + " = " + score);
Hashtable fmtResults = (Hashtable)allResults.get(format);
if (fmtResults == null) {
fmtResults = new Hashtable();
allResults.put(format, fmtResults);
}
Hashtable testResults = (Hashtable)fmtResults.get(testname);
if (testResults == null) {
testResults = new Hashtable();
fmtResults.put(testname, testResults);
}
testResults.put(method, new Double(score));
}
if (wikiStyle) {
printWikiTable();
} else {
printHtmlTable();
}
}