From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH v2 1/3] Add gc-estimated-time variable Date: Sun, 22 Nov 2020 20:10:08 +0200 Message-ID: <83v9dxw9dr.fsf@gnu.org> References: <87h7pij7xo.fsf@catern.com> <20201122050829.9097-1-sbaugh@catern.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15118"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Spencer Baugh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 22 19:10:53 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kgtp7-0003q9-5a for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Nov 2020 19:10:53 +0100 Original-Received: from localhost ([::1]:57994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgtp6-0008SI-5V for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Nov 2020 13:10:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgtoW-00081A-4F for emacs-devel@gnu.org; Sun, 22 Nov 2020 13:10:16 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48840) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgtoV-0003Da-Hn; Sun, 22 Nov 2020 13:10:15 -0500 Original-Received: from [176.228.60.248] (port=2859 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kgtoV-0003aX-2l; Sun, 22 Nov 2020 13:10:15 -0500 In-Reply-To: <20201122050829.9097-1-sbaugh@catern.com> (message from Spencer Baugh on Sun, 22 Nov 2020 00:08:27 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259634 Archived-At: > From: Spencer Baugh > Cc: Spencer Baugh , > Eli Zaretskii > Date: Sun, 22 Nov 2020 00:08:27 -0500 > > + /* Decay very fast, since heap size can change rapidly. */ > + gc_time_ema = 0.5 * gc_time_ema + 0.5 * timespectod (this_gc_elapsed); > + Vgc_estimated_time = make_float (gc_time_ema); > + DEFVAR_LISP ("gc-estimated-time", Vgc_estimated_time, > + doc: /* An estimate of the time required for the next garbage collection. I guess "Estimated time before next garbage collection" is somewhat clearer, since "required" in this context might be confusing? > +The time is in seconds as a floating point value. > +This is calculated as an exponential moving average of the time > +required for previous garbage collections. */); I don't think the last sentence should be in the doc string. it doesn't add anything useful, and the source code is available. Thanks.