From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ZDA4BueoCWIdQwAAWB0awg (envelope-from ) for ; Sun, 13 Feb 2022 19:57:11 -0500 Received: by simark.ca (Postfix, from userid 112) id 0813C1F3C5; Sun, 13 Feb 2022 19:57:11 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 913441EDF0 for ; Sun, 13 Feb 2022 19:57:10 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0F1C33858423 for ; Mon, 14 Feb 2022 00:57:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F1C33858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644800229; bh=IxRksM5jyivH6FcIRWBlftC78EcAI4goVMMvRwOWfnQ=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=HOrojgaleotQwolxL+thYzQtPi4frCJTzatoDNJ+4EwJ5Hx3ZvbTQH8r98WLImxfs RJl5HE1boENLnWdxXSU9ixw5vVALsrBZiIKP7rdoCOjqNrTIPwsyzO3RkPPSAhF3cR zoSD7FX0I8unj8dLqadf7QwqrKWnbiPHTTW19v8I= Received: from jupiter.monnerat.net (jupiter.monnerat.net [46.226.111.226]) by sourceware.org (Postfix) with ESMTPS id 11A8B385840A for ; Mon, 14 Feb 2022 00:56:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 11A8B385840A Received: from [192.168.0.128] ([192.168.0.128]) by jupiter.monnerat.net (8.14.8/8.14.8) with ESMTP id 21E0ucVx021641 (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Feb 2022 01:56:43 +0100 DKIM-Filter: OpenDKIM Filter v2.10.3 jupiter.monnerat.net 21E0ucVx021641 Message-ID: Date: Mon, 14 Feb 2022 01:56:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v3] gdb: Improve debuginfod progress updates Content-Language: en-US To: Aaron Merey , gdb-patches@sourceware.org References: <20220126005817.56356-1-amerey@redhat.com> <20220209022548.343785-1-amerey@redhat.com> In-Reply-To: <20220209022548.343785-1-amerey@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Patrick Monnerat via Gdb-patches Reply-To: Patrick Monnerat Cc: tom@tromey.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi Aaron, I finally found time to check your patch with Insight and it seems to work. Please find some questions/remarks embedded in your code. > + /* Transfer size is known. */ > + double percent = (double)cur / (double)total; The variable name is confusing as it is <= 1.0. > + > + if (percent >= 0.0 && percent <= 1.0) I don't think this test is needed: cur and total are obtained (indirectly) from curl and IMHO you can trust it. > + progress_update object. */ > + void update_progress_bar (double howmuch) This is never called! why do you provide both PERCENT and (unused) BAR? This is a bit confusing. Thanks for your work on it. Patrick