如何使用apache commons csv跳过输入文件中的行.在我的文件中,前几行是垃圾有用的元信息,如日期等.找不到任何选项.
private void parse() throws Exception {
Iterable<CSVRecord> records = CSVFormat.EXCEL
.withQuote('"').withDelimiter(';').parse(new FileReader("example.csv"));
for (CSVRecord csvRecord : records) {
//do something
}
}
Run Code Online (Sandbox Code Playgroud) 吞吐量模式给了我 21 ops/ms。所以,我认为一个操作平均需要 1/21 毫秒。然而,平均模式给了我 0.937 ms/op 的分数。如何解释结果?
吞吐量模式:
Result "testMethod":
21.752 ±(99.9%) 0.081 ops/ms [Average]
(min, avg, max) = (20.681, 21.752, 22.529), stdev = 0.344
CI (99.9%): [21.671, 21.834] (assumes normal distribution)
# Run complete. Total time: 00:06:47
Benchmark Mode Cnt Score Error Units
MyBenchmark.testMethod thrpt 200 21.752 ± 0.081 ops/ms
Run Code Online (Sandbox Code Playgroud)
平均模式:
Result "testMethod":
0.937 ±(99.9%) 0.004 ms/op [Average]
(min, avg, max) = (0.890, 0.937, 0.979), stdev = 0.019
CI (99.9%): [0.932, 0.941] (assumes normal distribution)
# Run complete. …Run Code Online (Sandbox Code Playgroud)