public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Shannon Sterz" <s.sterz@proxmox.com>,
	"Lukas Wagner" <l.wagner@proxmox.com>,
	<pdm-devel@lists.proxmox.com>
Subject: Re: [PATCH datacenter-manager v3 10/11] ui: node status: add RRD graphs for PDM host metrics
Date: Wed, 15 Apr 2026 14:20:13 +0200	[thread overview]
Message-ID: <DHTQ2BZ0JBT3.3FUIN64CAQH69@proxmox.com> (raw)
In-Reply-To: <DHTLJFG4KSRO.R440ASZBUCSU@proxmox.com>

On Wed Apr 15, 2026 at 10:47 AM CEST, Shannon Sterz wrote:
> On Mon Apr 13, 2026 at 10:58 AM CEST, Lukas Wagner wrote:
>
> thanks for these helpers and the follow-up patch using them throughout
> pdm. i think they might make more sense in proxmox-yew-comp, though. we
> tend to implement more or less the same types of rrd charts across our
> products, so having them there is likely to come in handy again. what do
> you think?
>

Yeah, that makes sense, thanks for the hint! I'll send a v4 with these
moved to yew-comp.

>> +    /// Render CPU usage in percent. `v` is multiplied by 100 to get the percent value.
>> +    pub fn render_cpu_usage(v: &f64) -> String {
>> +        if v.is_finite() {
>> +            format!("{:.1}%", v * 100.0)
>> +        } else {
>> +            v.to_string()
>> +        }
>> +    }
>> +
>> +    /// Render server load value.
>> +    pub fn render_load(v: &f64) -> String {
>> +        if v.is_finite() {
>> +            format!("{:.2}", v)
>> +        } else {
>> +            v.to_string()
>> +        }
>> +    }
>> +
>> +    /// Render a byte value.
>> +    pub fn render_bytes(v: &f64) -> String {
>> +        if v.is_finite() {
>> +            proxmox_human_byte::HumanByte::from(*v as u64).to_string()
>> +        } else {
>> +            v.to_string()
>> +        }
>> +    }
>> +
>> +    /// Render bandwidth.
>> +    pub fn render_bandwidth(v: &f64) -> String {
>> +        if v.is_finite() {
>> +            let bytes = proxmox_human_byte::HumanByte::from(*v as u64);
>> +            format!("{bytes}/s")
>> +        } else {
>> +            v.to_string()
>> +        }
>> +    }
>> +
>> +    /// Render pressure stall value.
>> +    pub fn render_pressure(v: &f64) -> String {
>> +        if v.is_finite() {
>> +            format!("{:.1}%", v)
>> +        } else {
>> +            v.to_string()
>> +        }
>> +    }
>> +}





  reply	other threads:[~2026-04-15 12:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13  8:58 [PATCH datacenter-manager/proxmox-yew-comp v3 00/11] metric collection for the PDM host Lukas Wagner
2026-04-13  8:58 ` [PATCH proxmox-yew-comp v3 01/11] node status panel: add `children` property Lukas Wagner
2026-04-13  8:58 ` [PATCH proxmox-yew-comp v3 02/11] RRDGrid: fix size observer by attaching node reference to rendered container Lukas Wagner
2026-04-13  8:58 ` [PATCH proxmox-yew-comp v3 03/11] RRDGrid: add padding and increase gap between elements Lukas Wagner
2026-04-13  8:58 ` [PATCH datacenter-manager v3 04/11] metric collection: clarify naming for remote metric collection Lukas Wagner
2026-04-13  8:58 ` [PATCH datacenter-manager v3 05/11] metric collection: fix minor typo in error message Lukas Wagner
2026-04-13  8:58 ` [PATCH datacenter-manager v3 06/11] metric collection: collect PDM host metrics in a new collection task Lukas Wagner
2026-04-15  8:47   ` Shannon Sterz
2026-04-13  8:58 ` [PATCH datacenter-manager v3 07/11] api: fix /nodes/localhost/rrddata endpoint Lukas Wagner
2026-04-13  8:58 ` [PATCH datacenter-manager v3 08/11] pdm: node rrd data: rename 'total-time' to 'metric-collection-total-time' Lukas Wagner
2026-04-13  8:58 ` [PATCH datacenter-manager v3 09/11] pdm-api-types: add PDM host metric fields Lukas Wagner
2026-04-13  8:58 ` [PATCH datacenter-manager v3 10/11] ui: node status: add RRD graphs for PDM host metrics Lukas Wagner
2026-04-15  8:47   ` Shannon Sterz
2026-04-15 12:20     ` Lukas Wagner [this message]
2026-04-13  8:58 ` [PATCH datacenter-manager v3 11/11] ui: lxc/qemu/node: use RRD value render helpers Lukas Wagner
2026-04-14 14:08 ` [PATCH datacenter-manager/proxmox-yew-comp v3 00/11] metric collection for the PDM host Michael Köppl
2026-04-15 13:24 ` superseded: " Lukas Wagner

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=DHTQ2BZ0JBT3.3FUIN64CAQH69@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pdm-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal