Skip to content

Commit

Permalink
Merge pull request #231 from experdb/development
Browse files Browse the repository at this point in the history
- fixed bug from GS: fix disapear x axis label on autovacuum
  • Loading branch information
kayform authored Feb 27, 2024
2 parents 5bc6649 + 0723b9a commit 0692efc
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 36 deletions.
4 changes: 2 additions & 2 deletions build-all.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
76 changes: 42 additions & 34 deletions eXperDB_Monitoring_Client/iDast.MonPostgres/frmAutovacuum.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0692efc

Please sign in to comment.