From 0723b9ad5fdde4d998ea6511b419920373189513 Mon Sep 17 00:00:00 2001 From: robin Date: Tue, 27 Feb 2024 12:41:55 +0900 Subject: [PATCH] - fixed bug from GS: fix disapear x axis label on autovacuum --- build-all.bat | 4 +- .../iDast.MonPostgres/frmAutovacuum.vb | 76 ++++++++++--------- 2 files changed, 44 insertions(+), 36 deletions(-) diff --git a/build-all.bat b/build-all.bat index 538efb2..d16105c 100644 --- a/build-all.bat +++ b/build-all.bat @@ -6,8 +6,8 @@ SET "PATH=%PATH%;%PROGRAMFILES%\Git\bin;C:\apache-ant-1.9.9-bin;C:\Program Files For /F %%g in ('git rev-parse HEAD ^| cut -b 1-7') Do (Set GIT_COMMIT_HASH=%%g) -set BASE_VER=15.0.6 -set BASE_VER_UDERSCORE=15_0_6 +set BASE_VER=15.0.7 +set BASE_VER_UDERSCORE=15_0_7 For /F %%i in ('git rev-list HEAD ^| find /c /v ""') Do Set GIT_COMMIT_CNT=%%i diff --git a/eXperDB_Monitoring_Client/iDast.MonPostgres/frmAutovacuum.vb b/eXperDB_Monitoring_Client/iDast.MonPostgres/frmAutovacuum.vb index 7a97223..f57f6fa 100644 --- a/eXperDB_Monitoring_Client/iDast.MonPostgres/frmAutovacuum.vb +++ b/eXperDB_Monitoring_Client/iDast.MonPostgres/frmAutovacuum.vb @@ -171,8 +171,12 @@ sb_ChartAddPoint(Me.chtAutovacuumWorkers, "Vacuum", tmpDate, ConvDBL(dtRow.Item("COMMON"))) Next Else - Dim tmpDate As Double = ConvOADate(Now()) + 'Dim tmpDate As Double = ConvOADate(Now()) + 'sb_ChartAddPoint(Me.chtAutovacuumWorkers, "Wraparound prevention", tmpDate, 0.0) + 'sb_ChartAddPoint(Me.chtAutovacuumWorkers, "Vacuum", tmpDate, 0.0) + Dim tmpDate As Double = ConvOADate(dtpSt.Value) sb_ChartAddPoint(Me.chtAutovacuumWorkers, "Wraparound prevention", tmpDate, 0.0) + tmpDate = ConvOADate(dtpEd.Value) sb_ChartAddPoint(Me.chtAutovacuumWorkers, "Vacuum", tmpDate, 0.0) End If Catch ex As Exception @@ -245,38 +249,42 @@ ' End Sub) 'tmpTh.Start() 'tmpTh.Join() - If dtTable IsNot Nothing Then - Me.Invoke(New MethodInvoker(Sub() - Try - Dim sDateCollect As Double = 0.0 - If dtTable.Rows.Count > 0 Then - For Each dtRow As DataRow In dtTable.Rows - Dim tmpDate As Double = ConvOADate(dtRow.Item("COLLECT_DATE")) - For i As Integer = 0 To _arrTables.Count - 1 - Dim tmpTable As TableInfo = _arrTables(i) - If Not IsDBNull(dtRow.Item("RELID")) AndAlso dtRow.Item("RELID") = tmpTable.relID Then - 'sb_ChartAddPoint(Me.chtAutovacuumCount, tmpTable.tableName, tmpDate, dtRow.Item("DIFF")) - sb_RangeChartAddPoint(Me.chtAutovacuumCount, tmpTable.tableName, tmpDate, IIf(dtRow.Item("DIFF") > 0, 1, 0), i) - tmpTable.AxisXValue = tmpDate - _arrTables(i) = tmpTable - End If - Next - Next - Else - Dim tmpDate As Double = ConvOADate(Now()) - Dim j As Integer = 0 + Me.Invoke(New MethodInvoker(Sub() + Try + Dim sDateCollect As Double = 0.0 + If dtTable IsNot Nothing AndAlso dtTable.Rows.Count > 0 Then + For Each dtRow As DataRow In dtTable.Rows + Dim tmpDate As Double = ConvOADate(dtRow.Item("COLLECT_DATE")) For i As Integer = 0 To _arrTables.Count - 1 Dim tmpTable As TableInfo = _arrTables(i) - sb_ChartAddPoint(Me.chtAutovacuumCount, tmpTable.tableName, tmpDate, 0.0) + If Not IsDBNull(dtRow.Item("RELID")) AndAlso dtRow.Item("RELID") = tmpTable.relID Then + 'sb_ChartAddPoint(Me.chtAutovacuumCount, tmpTable.tableName, tmpDate, dtRow.Item("DIFF")) + sb_RangeChartAddPoint(Me.chtAutovacuumCount, tmpTable.tableName, tmpDate, IIf(dtRow.Item("DIFF") > 0, 1, 0), i) + tmpTable.AxisXValue = tmpDate + _arrTables(i) = tmpTable + End If Next - End If - Catch ex As Exception - p_Log.AddMessage(clsLog4Net.enmType.Error, ex.ToString) - GC.Collect() - End Try + Next + Else + 'Dim tmpDate As Double = ConvOADate(Now()) + 'Dim j As Integer = 0 + 'For i As Integer = 0 To _arrTables.Count - 1 + ' Dim tmpTable As TableInfo = _arrTables(i) + ' sb_ChartAddPoint(Me.chtAutovacuumCount, tmpTable.tableName, tmpDate, 0.0) + 'Next + Dim tmpDate As Double = ConvOADate(dtpSt.Value) + + AddSeries(Me.chtAutovacuumCount, "", "", Nothing, System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Range) + sb_ChartAddPoint(Me.chtAutovacuumCount, "", tmpDate, 0.0) + tmpDate = ConvOADate(dtpEd.Value) + sb_ChartAddPoint(Me.chtAutovacuumCount, "", tmpDate, 0.0) + End If + Catch ex As Exception + p_Log.AddMessage(clsLog4Net.enmType.Error, ex.ToString) + GC.Collect() + End Try - End Sub)) - End If + End Sub)) Me.Invoke(New MethodInvoker(Sub() sb_ChartAlignYAxies(Me.chtAutovacuumCount) @@ -360,10 +368,10 @@ ' sb_ChartAddPoint(Me.chtAutovacuumWraparound, _arrDatabases(i).ToString, tmpDate, 0.0) 'Next - Dim tmpDate As Double = ConvOADate(Now()) + Dim tmpDate As Double = ConvOADate(dtpSt.Value) sb_ChartAddPoint(Me.chtAutovacuumWraparound, _arrDatabases(0).ToString, tmpDate, 0.0) Dim tmpDt = DateAdd("n", -10, Now) - tmpDate = ConvOADate(tmpDt) + tmpDate = ConvOADate(dtpEd.Value) sb_ChartAddPoint(Me.chtAutovacuumWraparound, _arrDatabases(0).ToString, tmpDate, 0.0) End If Catch ex As Exception @@ -667,9 +675,9 @@ If _dtTableAutovacuumWorker IsNot Nothing Then drawAutovacuumWorker() End If - If _dtTableAutovacuumCount IsNot Nothing Then - drawAutovacuumCount() - End If + 'If _dtTableAutovacuumCount IsNot Nothing Then + drawAutovacuumCount() + 'End If End If _ProgresForm.Close()