From: Lukas Wagner <l.wagner@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Shannon Sterz <s.sterz@proxmox.com>,
Maximiliano Sandoval <m.sandoval@proxmox.com>
Subject: Re: [pbs-devel] [PATCH backup] pull_metrics: Rename argument called gen to point
Date: Fri, 21 Feb 2025 13:45:06 +0100 [thread overview]
Message-ID: <0ec7727e-a9e3-421a-92e3-cfcb54b0703c@proxmox.com> (raw)
In-Reply-To: <D7Y4QGBQE6EB.9YLO7O1TEAS@proxmox.com>
On 2025-02-21 13:40, Shannon Sterz wrote:
> On Fri Feb 21, 2025 at 10:13 AM CET, Maximiliano Sandoval wrote:
>> gen is a reserved keyword in the rust 2024 edition. See
>> https://doc.rust-lang.org/edition-guide/rust-2024/gen-keyword.html.
>>
>> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
>> ---
>> src/server/metric_collection/pull_metrics.rs | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/server/metric_collection/pull_metrics.rs b/src/server/metric_collection/pull_metrics.rs
>> index 1b5f3777..4d732071 100644
>> --- a/src/server/metric_collection/pull_metrics.rs
>> +++ b/src/server/metric_collection/pull_metrics.rs
>> @@ -73,9 +73,9 @@ pub fn get_all_metrics(start_time: i64) -> Result<Vec<MetricDataPoint>, Error> {
>>
>> let mut points = Vec::new();
>>
>> - for gen in cached_datapoints {
>> - if gen.timestamp > start_time {
>> - points.extend(gen.datapoints);
>> + for point in cached_datapoints {
>> + if point.timestamp > start_time {
>> + points.extend(point.datapoints);
>
> tiny nit: i'm guessing `gen` was short for `generation`, as in cache generation?
> maybe use `generation` instead. `point.datapoints` reads akwardly to
> me.
>
+1
`point` reads weird, since it is indeed a collection (or generation) of metric datapoints,
not a single point.
I'd also suggest calling it `generation`.
--
- Lukas
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-02-21 12:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 9:13 Maximiliano Sandoval
2025-02-21 12:40 ` Shannon Sterz
2025-02-21 12:45 ` Lukas Wagner [this message]
2025-02-21 13:00 ` Maximiliano Sandoval
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0ec7727e-a9e3-421a-92e3-cfcb54b0703c@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=m.sandoval@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=s.sterz@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.