From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Latency profiling? Date: Sun, 18 Mar 2018 22:46:14 +0200 Message-ID: <83370xp0x5.fsf@gnu.org> References: <3b1b3837-dcb6-66c5-3387-43dba8df77c4@arkona-technologies.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1521405859 11007 195.159.176.226 (18 Mar 2018 20:44:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Mar 2018 20:44:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sebastian Sturm Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 18 21:44:15 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exfA4-0002gy-1r for ged-emacs-devel@m.gmane.org; Sun, 18 Mar 2018 21:44:12 +0100 Original-Received: from localhost ([::1]:39124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exfC7-0002Pn-1s for ged-emacs-devel@m.gmane.org; Sun, 18 Mar 2018 16:46:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exfC0-0002PM-Ow for emacs-devel@gnu.org; Sun, 18 Mar 2018 16:46:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exfBv-0003KZ-NJ for emacs-devel@gnu.org; Sun, 18 Mar 2018 16:46:12 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exfBv-0003KN-JF; Sun, 18 Mar 2018 16:46:07 -0400 Original-Received: from [176.228.60.248] (port=1635 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1exfBv-0008Rr-1I; Sun, 18 Mar 2018 16:46:07 -0400 In-reply-to: <3b1b3837-dcb6-66c5-3387-43dba8df77c4@arkona-technologies.de> (message from Sebastian Sturm on Sun, 18 Mar 2018 21:29:54 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223792 Archived-At: > From: Sebastian Sturm > Date: Sun, 18 Mar 2018 21:29:54 +0100 > > What is the best way to emulate interactive user input and reliably > assess the speed with which said input is processed? If the slowdown is related to display, you can't do that except interactively. > Also, is there a way to profile not throughput, but latency (i.e. time > elapsed between key press and Emacs being ready for further input)? What's the difference? There will be no latency if the time that takes to process a command is short. > As far as I can see, there are hooks invoked on self-insert-command, > but I didn't find a hook that fires when redisplay is done. Anything > that uses external tracing frameworks would also be fine in my book, > as long as it runs on Linux. If you suspect (or have evidence) that the time is spent in the C code, I suggest to use perf.