Benchmarker.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:metanome-algorithms 作者:
protected static final void writeMetaData(File resultFile, THashMap<String, String> cmdLine) {
    StringBuilder metaDataLineBuilder = new StringBuilder();
    for (String optionKey : cmdLine.keySet()) {
        if (cmdLine.get(optionKey) != null) {
            metaDataLineBuilder.append(String.format("# %s :\t%s\n", optionKey, cmdLine.get(optionKey)));
            System.out.print(String.format("# %s :\t%s\n", optionKey, cmdLine.get(optionKey)));
        } else {
            metaDataLineBuilder.append(String.format("# %s :\t%s\n", optionKey, "true"));
            System.out.print(String.format("# %s :\t%s\n", optionKey, "true"));
        }
    }
    metaDataLineBuilder.append("#Filename\t#Rows\t#Columns\tTime\t#Deps\t#<2Deps\t#<3Deps\t#<4Deps\t#<5Deps\t#<6Deps\t#>5Deps\t#Partitions\n");
    System.out.println("#Filename\t#Rows\t#Columns\tTime\t#Deps\t#<2Deps\t#<3Deps\t#<4Deps\t#<5Deps\t#<6Deps\t#>5Deps\t#Partitions\n");
    try {
        BufferedWriter resultFileWriter = new BufferedWriter(new FileWriter(resultFile));
        resultFileWriter.write(metaDataLineBuilder.toString());
        resultFileWriter.close();
    } catch (IOException e) {
        System.out.println("Couldn't write meta data.");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号