aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/edu/brown/cs/student/ProfitCalculationTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/edu/brown/cs/student/ProfitCalculationTest.java')
-rw-r--r--src/test/java/edu/brown/cs/student/ProfitCalculationTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/java/edu/brown/cs/student/ProfitCalculationTest.java b/src/test/java/edu/brown/cs/student/ProfitCalculationTest.java
index 1291245..4ca1780 100644
--- a/src/test/java/edu/brown/cs/student/ProfitCalculationTest.java
+++ b/src/test/java/edu/brown/cs/student/ProfitCalculationTest.java
@@ -140,5 +140,21 @@ public class ProfitCalculationTest {
assertEquals(profitCalculation.getHoldingsList().get(0).getUnrealizedGain(), 0, .01);
}
+ @Test
+ public void optimizationTest() {
+ try {
+ db = new DatabaseQuerier("data/trades.sqlite3");
+ } catch (Exception e) {
+ System.out.println("DBQuerier Test, couldn't connect to db???");
+ }
+
+ ProfitCalculation profitCalculation = new ProfitCalculation(DatabaseQuerier.getConn(), "invalidTicker", new Date(1618223864000l),
+ new Date(1618483064000l));
+
+ long startTime = System.currentTimeMillis();
+ profitCalculation.getProfitMap();
+ System.out.println("DATA ENDPOINT " + ((System.currentTimeMillis() - startTime) / 1000) + "seconds");
+ }
+
} \ No newline at end of file