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


Java ResultHolder.getOptions方法代码示例

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


在下文中一共展示了ResultHolder.getOptions方法的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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:73,代码来源:IIOComparator.java


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