From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pdm-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 17AD51FF16F
	for <inbox@lore.proxmox.com>; Thu, 13 Feb 2025 13:12:58 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 0A4C32E28;
	Thu, 13 Feb 2025 13:12:55 +0100 (CET)
Message-ID: <f1f4cc1c-8175-4f79-989d-2770225788bc@proxmox.com>
Date: Thu, 13 Feb 2025 13:12:21 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Wolfgang Bumiller <w.bumiller@proxmox.com>
References: <20250211120541.163621-1-l.wagner@proxmox.com>
 <20250211120541.163621-18-l.wagner@proxmox.com>
 <l2mqcumyqraaf4qtjxs2ad7h7qqn5pbqhxhk2vvr2exyv5573d@erarn27rnlce>
Content-Language: de-AT, en-US
From: Lukas Wagner <l.wagner@proxmox.com>
In-Reply-To: <l2mqcumyqraaf4qtjxs2ad7h7qqn5pbqhxhk2vvr2exyv5573d@erarn27rnlce>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.010 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pdm-devel] [PATCH proxmox-datacenter-manager 17/25] metric
 collection: save time needed for collection run to RRD
X-BeenThere: pdm-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Datacenter Manager development discussion
 <pdm-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pdm-devel>, 
 <mailto:pdm-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pdm-devel/>
List-Post: <mailto:pdm-devel@lists.proxmox.com>
List-Help: <mailto:pdm-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel>, 
 <mailto:pdm-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox Datacenter Manager development discussion
 <pdm-devel@lists.proxmox.com>
Cc: pdm-devel@lists.proxmox.com
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pdm-devel-bounces@lists.proxmox.com
Sender: "pdm-devel" <pdm-devel-bounces@lists.proxmox.com>



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@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



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel