[pdm-devel] [PATCH proxmox-datacenter-manager 17/25] metric collection: save time needed for collection run to RRD
Lukas Wagner
l.wagner at proxmox.com
Thu Feb 13 13:12:21 CET 2025
On 2025-02-13 12:53, Wolfgang Bumiller wrote:
> On Tue, Feb 11, 2025 at 01:05:33PM +0100, Lukas Wagner wrote:
>> For large setups, it might be useful to know how much time was needed to
>> collect metrics for *all* remotes together, e.g. for making sure that
>> the collection interval is not exceeded.
>>
>> Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
>> ---
>> .../src/metric_collection/collection_task.rs | 15 ++++++
>> server/src/metric_collection/rrd_task.rs | 50 +++++++++++++++----
>> 2 files changed, 56 insertions(+), 9 deletions(-)
>>
>> diff --git a/server/src/metric_collection/collection_task.rs b/server/src/metric_collection/collection_task.rs
>> index 27a9987..501df9b 100644
>> --- a/server/src/metric_collection/collection_task.rs
>> +++ b/server/src/metric_collection/collection_task.rs
>> @@ -22,6 +22,7 @@ use pdm_api_types::{
>> };
>> use pdm_config::metric_collection::COLLECTION_SETTINGS_TYPE;
>>
>> +use crate::metric_collection::rrd_task::CollectionStats;
>> use crate::{connection, task_utils};
>>
>> use super::{
>> @@ -97,6 +98,20 @@ impl MetricCollectionTask {
>> if let Some(remotes) = Self::load_remote_config() {
>> let to_fetch = remotes.order.as_slice();
>> self.fetch_remotes(&remotes, to_fetch).await;
>> +
>> + let now = Instant::now();
>> + self.fetch_remotes(&remotes, &remotes.order).await;
>
> 2 `fetch_remotes` calls now look a bit weird ;-)
> should probably fold in some later change?
>
Uhhh, yeah, I guess thats a mishap from a conflict during rebasing. I'll fix it, thanks.
--
- Lukas
More information about the pdm-devel
mailing list