From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mMCzFpTZnGFiTgAAgWs5BA (envelope-from ) for ; Tue, 23 Nov 2021 13:07:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2F+NEpTZnGFnGQAA1q6Kng (envelope-from ) for ; Tue, 23 Nov 2021 12:07:48 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 103E189D2 for ; Tue, 23 Nov 2021 13:07:48 +0100 (CET) Received: from localhost ([::1]:37292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpUaR-00036q-5Q for larch@yhetil.org; Tue, 23 Nov 2021 07:07:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpUYO-0001CW-S4 for guix-devel@gnu.org; Tue, 23 Nov 2021 07:05:41 -0500 Received: from [2a00:5884:8208::1] (port=35058 helo=lepiller.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpUYL-0003k8-Ma for guix-devel@gnu.org; Tue, 23 Nov 2021 07:05:40 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 9d5e4517; Tue, 23 Nov 2021 12:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=CuKKx96UNOIo HikumBDP+ijN70RvMU0XQT5TWUAuyok=; b=PtVib8ni5cTpiENF45v2ruk0CS+e 8tKc8xB+WKtRKSzQJS1u7SJVT5xF6YAGLD2UV2P8gH63w6trpgx8ibiQ1MOBvOIX ZxLpGruS4U6zhk8Utd81T3dkef+vUUGJGbHboVjeLaXURkrAfueGuwrXiyW/pOsG AzDe+T20UmZFGYJNFpMp0HBBBEVsUS0K7SX6mX5PRTWnbE1frpxBNTUCthX39cv5 FkEB38sMqktWLbZr+v3COsD8R8XlCX3J9Nhw3DIh2vhGGYrnc2KsTGUGntVVzYnY ksGhKB6nrdAdVMvNsPqh7Uu82aPcMlylRlKJdjU/7xovB/SMgRS9UAc4Ew== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 492d36d7 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 23 Nov 2021 12:05:30 +0000 (UTC) Date: Tue, 23 Nov 2021 07:05:20 -0500 From: Julien Lepiller To: Jacob Hrbek , zimoun Subject: Re: Proposal: Build timers User-Agent: K-9 Mail for Android In-Reply-To: References: <868rxfwuib.fsf@gmail.com> Message-ID: <41445168-F908-4316-8AC4-55AFB3F43FB0@lepiller.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:5884:8208::1 (failed) Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "guix-devel@gnu.org" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637669268; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=UWqolMYGsESCzN2oZMsYlihtAPYhiQJNmvTvdpuExgs=; b=psGaI2f3aGHt13GuaN05X7QqQJb2epzc0mhLo6VksnU1TCVviTi+V5OnyRY7aERB0YE8WD UmCKUqWxPBRyJG673RXkICEPO3GKaf4dM1UYrDXRhppvCAb+4HrFbE6w9uJL7SwUl9JWGC BAqjYcEavv2zlpiXd85zFKVcm1x7aI8DYFAK+ROgs9BrrNzZDkaVG7e7URBOI9xfz/mvgk tzT7iKkqglfZ0GF1evpNC5/PsOSTEAGohgEt9sU0TtEm6sNPFzSgQVZi8JqbwLnPUmSWnd Pn7OiEmis22xe8B4B8ZX/yghsuylnh4L8J10L4Vh+EMzOTGKwldp7E023Ef/MQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637669268; a=rsa-sha256; cv=none; b=DJQ3PAXYeq3+R+Fjc92jGhpwlIt/8IKOvmQRNeGviwk0UOW9L0c2VOiNcmVfJMw7aH3kys JtXPqOhAOHzN9s7CTwzG0EVggP1l1wXzxK5cVoZ28rgP5rG3kjSi1sIQpotAaHwmE7iqea L5dnGpwUyaKVJHlwoKnMmDMTo/vZkOQ/bMAuz6pbWFlTwWHDkWhm3qnY8Tl3fxMCYwRlQ9 +GNccblzvJEjrrtZjEk+afbtkuLHVFyeGjWLR/+GopbkAURVCQ56Fx44Rcj93xV988VwDv z14RCUv8dACSFJAKx9uetL/xr2eYa6CHWjGb+YV7uLe2bKZwaBykj5UYjUTstg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=PtVib8ni; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.08 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=PtVib8ni; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 103E189D2 X-Spam-Score: -4.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: OVOPaIIGeHX9 Le 23 novembre 2021 01:21:06 GMT-05:00, Jacob Hrbek a =C3=A9crit=C2=A0: >I think you are overcomplicating the implementation=2E=2E What I am propo= sing is to store the time value before and after the build and then log the= subtraction of these two values per package (or even per package's phase)= =2E > >For storage it can be either/both: >1=2E locally: Storing the value somewhere on the system and adding up to = it each build to provide more accurate average=2E > >**optionally** This local database can be shared across multiple systems = that add values to it like simple listener waiting for POST requests=2E We already log time on cuirass, but we don't use this information at all= =2E If you could provide some wip code to show how you would implement the = feature with this info, that would be great for this discussion=2E For jocal logs, there is the store database (in /var/guix) for instance, t= hough running the gc will also erase the info along with the store item=2E >- within the guix repo: Since we are already building the package we can = take the time and then do the provided math in reverse to calculate the tim= e: > > Build took 100 sec on system with 8 threads at 2=2E4 Ghz max cpu freq= uency: > > 100 * (2=2E4 * 8) =3D 1920 (build time value per one thread at 1 Ghz) > > Building the package on system with 2 threads at 2=2E4 Ghz max cpu fr= equency: > > 1920 / (2 * 2=2E4) =3D 400 > > We can then assume that the build will take 1920/400=3D4=2E8 -> 4=2E8= times longer on this system=2E LFS has a notion of a Standard Build Unit (SBU), that is the build time of= a particular package on your machine=2E Each package build time is estimat= ed in SBU=2E However, they do not take threads into account, because the re= lation is not exactly proportional (some parts are linear, there is some ov= erhead, =E2=80=A6)=2E SBUs change quite often with versions, so I don't thi= nk averaging on different versions/derivations would make a lot of sense=E2= =80=A6 But I suppose this info could help determine how long it should take= to build the same derivation or a similar one=2E