xenadmin/XenAdmin/Controls/CustomDataGraph
Danilo Del Busso bba9f43c31
CA-376887: Refactor thread management for ArchiveMaintainer (#3148)
* Tidy up `ArchiveMaintainer`: use naming conventions
* Tidy up `ArchiveMaintainer`: use `var` when possible
* Tidy up `ArchiveMaintainer`: fix typos
* Tidy up `ArchiveMaintainer`: move action methods in own region
* Tidy up `ArchiveMaintainer`: apply code formatting
* Tidy up `ArchiveMaintainer`: remove unused constant/using
* Tidy up `ArchiveMaintainer`: group methods into regions
* Tidy up `ArchiveMaintainer`: remove xmldocs
* Tidy up `ArchiveMaintainer`: miscellaneous changes
* Tidy up `ArchiveMaintainer`: move `NextArchiveDown` to correct `region`
* CA-376887: Use multiple threads to load performance tab data
This commit removes the ad-hoc use of `Thread` and instead relies on `ThreadPool` and `CancellationToken`s to handle multi-threading. To achieve this, `ArchiveMaintainer` instances are now tied to only one `XenObject`. If a user navigates to another Performance tab, a new instance of `ArchiveMaintainer` is used. This enables XenCenter to quietly cancel ongoing data fetching operations, and start a new one without affecting the UI. UI elements are simply updated to point to the new `ArchiveMaintainer` while the old one is being  closed.
Please note that follow up commits to clean up `ArchiveMaintiner` and this implementation are coming. They have been separated to make reviews easier
* CA-376887: Move initial load logic to separate method in `ArchiveMaintainer`
* CA-376887: Rename `Update` to `StartUpdateLoop` in `ArchiveMaintainer`
* CA-376887: Fix use of `Dispose` in `PerformancePage` and collapse `Stop`/`Pause` into one method
* CA-376887: Remove unused `FirstTime` variable
* Tidy up `ArchiveMaintainer`: use `switch` when possible and improve logging
* Tidy up `ArchiveMaintainer`: Move variables inline
* Tidy up `ArchiveMaintainer`: Standardize fields/properties
* Tidy up `ArchiveMaintainer`: Normalize whitespace
* CA-376887: Ensure only one thread is spawned for each `ArchiveMaintainer`
- Ensures resources are disposed of
- Fixes issues whereby quickly starting and stopping threads for the same `XenObject` `ArchiveMantainer` would cause threads from not exiting
* Improve formatting and whitespace in `ArchiveMaintainer`
* Improve logging of exceptions in `ArchiveMaintainer:Get`
* Fix `ServerNow` calls in `ArchiveMaintainer`
* Deregister `ArchiveMaintainer` events when a new one is reassigned.
Also rename methods
* Apply code review suggestions

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
2023-09-07 10:03:43 +01:00
..
ArchiveMaintainer.cs CA-376887: Refactor thread management for ArchiveMaintainer (#3148) 2023-09-07 10:03:43 +01:00
DataArchive.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DataAxis.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DataEvent.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DataEventList.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DataEventList.designer.cs CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
DataEventList.ja.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
DataEventList.resx CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
DataEventList.zh-CN.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
DataGrid.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DataKey.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DataKey.Designer.cs CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
DataKey.ja.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
DataKey.resx CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
DataKey.zh-CN.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
DataPlot.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DataPlot.designer.cs CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
DataPlot.ja.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
DataPlot.resx CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
DataPlot.zh-CN.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
DataPlotNav.cs CA-376887: Refactor thread management for ArchiveMaintainer (#3148) 2023-09-07 10:03:43 +01:00
DataPlotNav.designer.cs CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
DataPlotNav.ja.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
DataPlotNav.resx CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
DataPlotNav.zh-CN.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
DataPoint.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DataRange.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DataSet.cs Add missing reads/s unit mapping 2023-05-05 14:53:58 +01:00
DataTimeRange.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
DrawSetArgs.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
GraphHelpers.cs Merge pull request #3091 from danilo-delbusso/datasources-CP-40157 2023-02-13 14:04:52 +00:00
GraphList.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
GraphList.Designer.cs CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
GraphList.ja.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
GraphList.resx CP-4816: Initial commit to git repo 2013-06-24 12:41:48 +01:00
GraphList.zh-CN.resx L10N : Dundee translation checkins Iteration 01 2016-03-21 16:45:35 +05:30
LineRenderer.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
LongPoint.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
LongRectangle.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
Palette.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00
Polygon.cs Updated copyright notice on files. 2023-01-30 16:24:16 +00:00