From fd2ba70031f017fbcea2bc24523cf1a53972a80a Mon Sep 17 00:00:00 2001 From: Taha Date: Mon, 29 May 2023 11:35:49 -0400 Subject: [PATCH] Culling the logs --- .../Bus/SingleVolSurfaceCommittedOutputRetriever.cs | 6 +++--- .../AW2/Bus/SingleVolSurfaceNonVolDataSource.cs | 2 +- .../spark/AW2/Bus/SymbolAggregationPublisher.cs | 2 +- .../spark/AW2/ViewModel/Grid/VolSurfaceCellVM.cs | 7 ++++--- .../Pricing/VolSurfaceInterpGreeksProducer.cs | 4 ++-- src/client/spark/Daemons/MergedMDDaemon.cs | 2 +- src/client/spark/Risk/PNL/PNLReportCalculator.cs | 2 +- src/client/spark/Risk/Slide/SlideReportCalculator.cs | 12 ++++++------ src/client/spark/core/Bus/SimpleBus.cs | 4 ++-- 9 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/client/spark/AW2/Bus/SingleVolSurfaceCommittedOutputRetriever.cs b/src/client/spark/AW2/Bus/SingleVolSurfaceCommittedOutputRetriever.cs index efd625c68..dcc20d6bf 100644 --- a/src/client/spark/AW2/Bus/SingleVolSurfaceCommittedOutputRetriever.cs +++ b/src/client/spark/AW2/Bus/SingleVolSurfaceCommittedOutputRetriever.cs @@ -63,9 +63,9 @@ namespace mbts.spark { vs_input, vs_nonvol_data.contracts, aux_data_map); _timer.stop(); var tag_str = tag == null ? "Null" : tag.ToString(); - bts.Log.Gen.info($"SingleVolSurfaceCommittedOutputRetriever._recompute_and_publish " + - $"vs_id: {_vs_id} time:{_timer.lastIntervalTime} ms tag:{tag_str} " + - $"tid:{_tid()}"); //output: {vs_output.log_string()}*/"); + // bts.Log.Gen.info($"SingleVolSurfaceCommittedOutputRetriever._recompute_and_publish " + + // $"vs_id: {_vs_id} time:{_timer.lastIntervalTime} ms tag:{tag_str} " + + // $"tid:{_tid()}"); //output: {vs_output.log_string()}*/"); _logger.log(_log_id, _log_id, _timer.lastIntervalTime); _bb.post(_out_bb_computed_vol_tag, vs_output); } diff --git a/src/client/spark/AW2/Bus/SingleVolSurfaceNonVolDataSource.cs b/src/client/spark/AW2/Bus/SingleVolSurfaceNonVolDataSource.cs index de57a31c3..186621cf9 100644 --- a/src/client/spark/AW2/Bus/SingleVolSurfaceNonVolDataSource.cs +++ b/src/client/spark/AW2/Bus/SingleVolSurfaceNonVolDataSource.cs @@ -75,7 +75,7 @@ namespace mbts.spark { var exp_price_map = OptionDriverPriceMap.get_vs_price_map( all_sym_price_map, (s) => _option_symbols.Contains(s)); if (sc_data != null && vs_nonvol_input != null && exp_price_map != null) { - bts.Log.Gen.info($"SingleVolSurfaceNonVolDataSource vs_id:{_vs_id} " + + bts.Log.Gen.diag($"SingleVolSurfaceNonVolDataSource vs_id:{_vs_id} " + "publishing VolSurfaceNonVolData"); _bb.post(_out_bb_vs_nonvol_data_tag, new VolSurfaceNonVolData( diff --git a/src/client/spark/AW2/Bus/SymbolAggregationPublisher.cs b/src/client/spark/AW2/Bus/SymbolAggregationPublisher.cs index 4ee05aaaf..915042afc 100644 --- a/src/client/spark/AW2/Bus/SymbolAggregationPublisher.cs +++ b/src/client/spark/AW2/Bus/SymbolAggregationPublisher.cs @@ -81,7 +81,7 @@ namespace mbts.analytics { output.Add(symbol, symbol_data); } IReadOnlyDictionary ro_output = output; - bts.Log.Gen.info($"SymbolAggregationPublisher._on_timer publishing " + + bts.Log.Gen.diag($"SymbolAggregationPublisher._on_timer publishing " + $"tag: {_out_tag} sz: {ro_output.Count}"); _bb.post(_out_tag, ro_output); } diff --git a/src/client/spark/AW2/ViewModel/Grid/VolSurfaceCellVM.cs b/src/client/spark/AW2/ViewModel/Grid/VolSurfaceCellVM.cs index e1d995427..ce223e54e 100644 --- a/src/client/spark/AW2/ViewModel/Grid/VolSurfaceCellVM.cs +++ b/src/client/spark/AW2/ViewModel/Grid/VolSurfaceCellVM.cs @@ -28,9 +28,10 @@ namespace mbts.spark { _candidate_value.Changed += on_candidate_changed; _is_dirty.Changed += (o, n) => { Log.assert(o != n); - Log.Ui.info( - $"VolSurface '{expiration}.{column}' is_dirty changed to {n}. " + - $"commited: {committed_value}; candidate: {candidate_value}"); + // TODO: John, this was logged too many times + // Log.Ui.info( + // $"VolSurface '{expiration}.{column}' is_dirty changed to {n}. " + + // $"commited: {committed_value}; candidate: {candidate_value}"); }; void on_committed_changed(object? oldval, object? newval) => diff --git a/src/client/spark/Analytics/Pricing/VolSurfaceInterpGreeksProducer.cs b/src/client/spark/Analytics/Pricing/VolSurfaceInterpGreeksProducer.cs index d81405638..685256de5 100644 --- a/src/client/spark/Analytics/Pricing/VolSurfaceInterpGreeksProducer.cs +++ b/src/client/spark/Analytics/Pricing/VolSurfaceInterpGreeksProducer.cs @@ -88,8 +88,8 @@ namespace mbts.analytics { public void set_driver_price( IDictionary driver_price_map) { - Log.Gen.info($"VolSurfaceInterpGreeksProducer.set_driver_price " + - $"vs_id: {_vs_id} exp_count: {driver_price_map.Count}"); + // Log.Gen.info($"VolSurfaceInterpGreeksProducer.set_driver_price " + + // $"vs_id: {_vs_id} exp_count: {driver_price_map.Count}"); _driver_price_map = new Dictionary(driver_price_map); _compute_and_fire(InputType.DriverPrice); } diff --git a/src/client/spark/Daemons/MergedMDDaemon.cs b/src/client/spark/Daemons/MergedMDDaemon.cs index 61619fd26..20ae66f88 100644 --- a/src/client/spark/Daemons/MergedMDDaemon.cs +++ b/src/client/spark/Daemons/MergedMDDaemon.cs @@ -62,7 +62,7 @@ namespace bts { } private void _on_server_sec_map(IReadOnlyDictionary sec_map) { - _log_options(sec_map); + //_log_options(sec_map); bts.Log.Gen.info(String.Format("MergedMDDaemon._on_server_sec_map sz: {0}", sec_map.Count())); _server_sec_map = new Dictionary(sec_map); _merge_and_post(); diff --git a/src/client/spark/Risk/PNL/PNLReportCalculator.cs b/src/client/spark/Risk/PNL/PNLReportCalculator.cs index 902208655..d612635d5 100644 --- a/src/client/spark/Risk/PNL/PNLReportCalculator.cs +++ b/src/client/spark/Risk/PNL/PNLReportCalculator.cs @@ -121,7 +121,7 @@ namespace mbts.analytics { timer.stop(); Log.Ui.info($"PNLReportCalculator n_pos: {output.position_data.Count()} " + $"n_day_trades: {output.day_trades.Count()} time(msecs): {timer.lastIntervalTime}"); - _log_before_posting(output.position_data); + //_log_before_posting(output.position_data); _bus.post(SparkTags.ReportBlackboardTags.PNL.PNLData, output); }); } diff --git a/src/client/spark/Risk/Slide/SlideReportCalculator.cs b/src/client/spark/Risk/Slide/SlideReportCalculator.cs index 966caab9e..8620b5591 100644 --- a/src/client/spark/Risk/Slide/SlideReportCalculator.cs +++ b/src/client/spark/Risk/Slide/SlideReportCalculator.cs @@ -115,21 +115,21 @@ namespace mbts.analytics { } private void _handle_nonvol_data(VolSurfaceNonVolData vs_nonvol_data) { - bts.Log.Gen.info(String.Format("SlideReportCalculator._handle_nonvol_data report {0}", - _report.ReportName)); + // bts.Log.Gen.info(String.Format("SlideReportCalculator._handle_nonvol_data report {0}", + // _report.ReportName)); _vs_nonvol_data = vs_nonvol_data; } private void _handle_future_prices( IReadOnlyDictionary future_prices_map) { - bts.Log.Gen.info(String.Format("SlideReportCalculator._handle_future_prices report {0}", - _report.ReportName)); + // bts.Log.Gen.Diag(String.Format("SlideReportCalculator._handle_future_prices report {0}", + // _report.ReportName)); _future_prices_map = future_prices_map.ToDictionary(kv => kv.Key, kv => kv.Value.theo); } private void _handle_trades(IEnumerable trades) { - bts.Log.Gen.info(String.Format("SlideReportCalculator._handle_trades report {0}", - _report.ReportName)); + // bts.Log.Gen.info(String.Format("SlideReportCalculator._handle_trades report {0}", + // _report.ReportName)); _all_trades = trades.Where(t => t.is_active); if (_report.CalcMode == Report.Types.ReportCalculationMode.PositionOrTheoChange) { _compute_dirty = true; diff --git a/src/client/spark/core/Bus/SimpleBus.cs b/src/client/spark/core/Bus/SimpleBus.cs index e4b813e4f..a99900653 100644 --- a/src/client/spark/core/Bus/SimpleBus.cs +++ b/src/client/spark/core/Bus/SimpleBus.cs @@ -35,7 +35,7 @@ namespace bts.core { // TODO: for debugging purposes, remove it later if (tag != mbts.spark.SparkTags.SparkTimer) { var tid = System.Threading.Thread.CurrentThread.ManagedThreadId; - bts.Log.Ui.diag($"SimpleBus.post tag:{tag} tid:{tid}"); + //bts.Log.Ui.diag($"SimpleBus.post tag:{tag} tid:{tid}"); return; } } catch (Exception e) { @@ -45,7 +45,7 @@ namespace bts.core { public IObservable subscribe(ITag tag) { var tid = System.Threading.Thread.CurrentThread.ManagedThreadId; - bts.Log.Ui.info($"SimpleBus.post tag:{tag} tid:{tid}"); + //bts.Log.Ui.info($"SimpleBus.subscribe tag:{tag} tid:{tid}"); return subject(tag); } }