From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <m.carrara@proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 1F6E8B810F for <pbs-devel@lists.proxmox.com>; Wed, 6 Mar 2024 18:30:20 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EFDB01CD76 for <pbs-devel@lists.proxmox.com>; Wed, 6 Mar 2024 18:29:49 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for <pbs-devel@lists.proxmox.com>; Wed, 6 Mar 2024 18:29:48 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 402AF48847 for <pbs-devel@lists.proxmox.com>; Wed, 6 Mar 2024 18:29:48 +0100 (CET) Message-ID: <c3fbb857-e4b9-435b-8e3e-0e883196298e@proxmox.com> Date: Wed, 6 Mar 2024 18:29:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Proxmox Backup Server development discussion <pbs-devel@lists.proxmox.com>, Christian Ebner <c.ebner@proxmox.com> References: <20240306141153.419283-1-c.ebner@proxmox.com> From: Max Carrara <m.carrara@proxmox.com> In-Reply-To: <20240306141153.419283-1-c.ebner@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.003 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pbs-devel] [PATCH proxmox-backup 0/3] fix #5285: log global statistics for sync job X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion <pbs-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/> List-Post: <mailto:pbs-devel@lists.proxmox.com> List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe> X-List-Received-Date: Wed, 06 Mar 2024 17:30:20 -0000 On 3/6/24 15:11, Christian Ebner wrote: > Adds a global summary of the transferred chunk size and count, as well > as the average transfer rate of a sync job to it's task log. > > Patch 1/3 introduces a PullStats object, used to return the relevant > data from each pull related method call. > > Patch 2/3 adds the summary log line to the tasklog. > > Patch 3/3 finally adapts the current log output to use the > functionality of `HumanByte` to produce consistent output. > > Tested by creating a local sync job and syncing a datastore, checking > the output in the tasklog. > Chunk counts where compared to `find .chunks -type f -print | wc -l`. > > Bugtracker link: > https://bugzilla.proxmox.com/show_bug.cgi?id=5285 > > Christian Ebner (3): > server: sync: return `PullStats` for pull related methods > fix #5285: api: sync: add job summary to task log > server: sync: use HumanByte for task log output > > src/api2/pull.rs | 12 ++++- > src/server/pull.rs | 130 ++++++++++++++++++++++++++++++--------------- > 2 files changed, 99 insertions(+), 43 deletions(-) > Looks pretty good to me! * The patches are very straightforward and easy to follow. * Code is formatted with `cargo fmt`. * `cargo clippy` doesn't complain about your changes either. Unfortunately didn't get around to testing it just yet due to the proxmox-schema changes (as you spotted off-list already), so will do that as soon as that's sorted out. Can't complain otherwise, very clean! Reviewed-By: Max Carrara <m.carrara@proxmox.com>