From: Ian Jackson Date: Sat, 4 Sep 2010 20:33:42 +0000 (+0100) Subject: remove arbitrage debugging printfs X-Git-Tag: 0.9.9~25 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=jarrg-ian.git;a=commitdiff_plain;h=7434e7c58877886b38fcabda7413a884cd29cf50 remove arbitrage debugging printfs --- diff --git a/src/com/tedpearson/ypp/market/MarketUploader.java b/src/com/tedpearson/ypp/market/MarketUploader.java index df87f43..f1f78e1 100644 --- a/src/com/tedpearson/ypp/market/MarketUploader.java +++ b/src/com/tedpearson/ypp/market/MarketUploader.java @@ -997,7 +997,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis } private int calculateArbitrageCommodity(ArrayList> arb_bs) { - System.out.println("ARBITRAGE?"); + //System.out.println("ARBITRAGE?"); int profit = 0; SortedSet buys = arb_bs.get(0); SortedSet sells = arb_bs.get(1); @@ -1013,8 +1013,8 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis int unitprofit = buy[0] - sell[0]; int count = buy[1] < sell[1] ? buy[1] : sell[1]; - System.out.println(" sell @"+sell[0]+" x"+sell[1]+" buy @"+buy[0]+" x"+buy[1] - +" => x"+count+" @"+unitprofit); + //System.out.println(" sell @"+sell[0]+" x"+sell[1]+" buy @"+buy[0]+" x"+buy[1] + // +" => x"+count+" @"+unitprofit); if (unitprofit <= 0) break; @@ -1025,7 +1025,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis if (buy[1]==0) buys.remove(buy); if (sell[1]==0) sells.remove(sell); } - System.out.println(" PROFIT "+profit); + //System.out.println(" PROFIT "+profit); return profit; } @@ -1046,7 +1046,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis for (ArrayList row : data) { String thiscommod = row.get(0); - System.out.println("ROW "+row.toString()); + //System.out.println("ROW "+row.toString()); if (lastcommod == null || !thiscommod.equals(lastcommod)) { if (lastcommod != null) arbitrage += calculateArbitrageCommodity(arb_bs); @@ -1054,7 +1054,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis arb_bs = new ArrayList>(2); arb_bs.add(0, new TreeSet(compar)); arb_bs.add(1, new TreeSet(compar)); - System.out.println("ROW init"); + //System.out.println("ROW init"); lastcommod = thiscommod; } for (int bs = 0; bs < 2; bs++) {