forked from deephaven/benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Csv read and write benchmarks (deephaven#221)
- Loading branch information
Showing
6 changed files
with
288 additions
and
152 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
src/it/java/io/deephaven/benchmark/tests/standard/file/CsvColTypeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package io.deephaven.benchmark.tests.standard.file; | ||
|
||
import org.junit.jupiter.api.*; | ||
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; | ||
|
||
/** | ||
* Standard tests for writing single column CSV for different column types. | ||
*/ | ||
@TestMethodOrder(OrderAnnotation.class) | ||
class CsvColTypeTest { | ||
final FileTestRunner runner = new FileTestRunner(this); | ||
|
||
@Test | ||
@Order(1) | ||
void writeThreeIntegralCols() { | ||
runner.setScaleFactors(5, 3); | ||
runner.runCsvWriteTest("CsvWrite- 3 Integral Cols -Static", "short10K", "int10K", "long10K"); | ||
} | ||
|
||
@Test | ||
@Order(2) | ||
void readThreeIntegralCols() { | ||
runner.setScaleFactors(5, 3); | ||
runner.runCsvReadTest("CsvRead- 3 Integral Cols -Static", "short10K", "int10K", "long10K"); | ||
} | ||
|
||
@Test | ||
@Order(3) | ||
void writeOneStringCol() { | ||
runner.setScaleFactors(5, 5); | ||
runner.runCsvWriteTest("CsvWrite- 1 String Col -Static", "str10K"); | ||
} | ||
|
||
@Test | ||
@Order(4) | ||
void readOneStringCol() { | ||
runner.setScaleFactors(5, 5); | ||
runner.runCsvReadTest("CsvRead- 1 String Col -Static", "str10K"); | ||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
src/it/java/io/deephaven/benchmark/tests/standard/file/CsvMultiColTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package io.deephaven.benchmark.tests.standard.file; | ||
|
||
import org.junit.jupiter.api.*; | ||
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; | ||
|
||
/** | ||
* Standard tests for writing/reading multi-column data. To save time, the csv generated by the "write" tests is used by | ||
* the "read" tests. | ||
*/ | ||
@TestMethodOrder(OrderAnnotation.class) | ||
class CsvMultiColTest { | ||
final String[] usedColumns = {"str10K", "long10K", "int10K", "short10K"}; | ||
final FileTestRunner runner = new FileTestRunner(this); | ||
|
||
|
||
@BeforeEach | ||
void setup() { | ||
runner.setScaleFactors(5, 2); | ||
} | ||
|
||
@Test | ||
@Order(1) | ||
void writeMultiCol() { | ||
runner.runCsvWriteTest("CsvWrite- Multi Col -Static", usedColumns); | ||
} | ||
|
||
@Test | ||
@Order(2) | ||
void readMultiCol() { | ||
runner.runCsvReadTest("CsvRead- Multi Col -Static"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.