diff options
author | clarkohw <clark_oh-willeke@brown.edu> | 2021-04-19 18:49:44 -0400 |
---|---|---|
committer | clarkohw <clark_oh-willeke@brown.edu> | 2021-04-19 18:49:44 -0400 |
commit | 43d42b0b88927a552c09bc32145f7e7ef2222652 (patch) | |
tree | 7bba5ef9f186837cff3dc7a7cde30e6e66bb4a75 /src/test/java/edu/brown/cs/student/ProfitCalculationTest.java | |
parent | 58dbfe9d7e511e47c8b50078f060911de74b1d4b (diff) |
exclude only sell people
Diffstat (limited to 'src/test/java/edu/brown/cs/student/ProfitCalculationTest.java')
-rw-r--r-- | src/test/java/edu/brown/cs/student/ProfitCalculationTest.java | 16 |
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 |