From 43d42b0b88927a552c09bc32145f7e7ef2222652 Mon Sep 17 00:00:00 2001 From: clarkohw Date: Mon, 19 Apr 2021 18:49:44 -0400 Subject: exclude only sell people --- .../java/edu/brown/cs/student/ProfitCalculationTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/test/java') 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 -- cgit v1.2.3-70-g09d2