From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joseph Garvin Newsgroups: gmane.emacs.devel Subject: Re: Latency profiling? Date: Sun, 18 Mar 2018 21:01:55 -0500 Message-ID: References: <3b1b3837-dcb6-66c5-3387-43dba8df77c4@arkona-technologies.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b751da0567ba572d" X-Trace: blaine.gmane.org 1521424848 12595 195.159.176.226 (19 Mar 2018 02:00:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Mar 2018 02:00:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 19 03:00:44 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 1exk6O-00035g-7i for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2018 03:00:44 +0100 Original-Received: from localhost ([::1]:39855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exk8M-0003UF-Au for ged-emacs-devel@m.gmane.org; Sun, 18 Mar 2018 22:02:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exk7b-0003Tq-7W for emacs-devel@gnu.org; Sun, 18 Mar 2018 22:02:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exk7a-0001mb-8c for emacs-devel@gnu.org; Sun, 18 Mar 2018 22:01:59 -0400 Original-Received: from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]:35426) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1exk7a-0001m7-3Y for emacs-devel@gnu.org; Sun, 18 Mar 2018 22:01:58 -0400 Original-Received: by mail-it0-x22a.google.com with SMTP id v194-v6so8381918itb.0 for ; Sun, 18 Mar 2018 19:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZXb7pXBRtd6RtBKHZu0XYHdcgps9VrIdrWwDvPNoABA=; b=vKbFwgvoJyGRCs2pRbNHHJop9u/xQ+IzHZ8ekYbAxjjZdvtCgrU4MaZOklBjSFcI+l yS4yEeDrPDpx6rS2sX5HVYlXqDTd6QnxFkF8CH117nV/XrJTpOUthzyoex9TaS8FmEzu DQNXPqdJq7qu9UrE8tndyEA0aHfdqg92h/Zw9UfSlb0egMM/tJ99IeP63iZs/3+4TTu3 x6uWo1r8dPL6BmZktGqENlMrXK4KakDOoOQ+z6rzFj1vvcfGi3pJZFS384XH1pkUYcNL rK+m5JZKI+4LnPiT80ORlMvUmhKg3pLciCeD1kdPme39q4wpzGh7Ehcunzw/LYLX2TTA hyIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZXb7pXBRtd6RtBKHZu0XYHdcgps9VrIdrWwDvPNoABA=; b=HyL53uSZDcZYwXjuHOpQJNumuY/ousXHsFjp1q4H5/w2j/dvT2PdyY+i+v1gRvR0UA NzAP9RZ//dmW0hOt8Po4bsWbHIdb+Mnp1JA1hahg+Zn8Oah3Xz9MVvSkWB+x9Pfmo17+ rVXzgd7MjT6doRvmUcvk66OCjqC5Q6CgWcqOk6ovjWZQqaqIb+NdahyKJlWZ07wQMG+i GK/GT9rmz0JZLMdSovCpdt81BeYQ7EGivVAqgDpaWzcUUYZybZ7d9Apj1enpaPLT3vkP 5sMSoLh/rV8MXtmls2oMT0ID9EPefYEdlx1pEbRSj1nKCfcd5LgtoKlZ7d9r6/dH6JVs 3tSQ== X-Gm-Message-State: AElRT7EvIbOIMu/46uJKcV24LJ58hvAM8MAWdPHBNNn5xFSaZkoYT9vw SA8NQznxF9iKzUqdZWNgejqZdCPQ5VzLJmFgZrM= X-Google-Smtp-Source: AG47ELsEtC4ArC+KgAslD+eno6Ozoz9hxmUim9OMjWNgTf9RfQVaetoFMhkLPeehtM5YtZiD+2oUhVA2VvTII4IEghA= X-Received: by 2002:a24:7b07:: with SMTP id q7-v6mr9970373itc.17.1521424916761; Sun, 18 Mar 2018 19:01:56 -0700 (PDT) Original-Received: by 10.2.93.74 with HTTP; Sun, 18 Mar 2018 19:01:55 -0700 (PDT) Original-Received: by 10.2.93.74 with HTTP; Sun, 18 Mar 2018 19:01:55 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::22a 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:223800 Archived-At: --000000000000b751da0567ba572d Content-Type: text/plain; charset="UTF-8" You could use a bash script that selects the Emacs window with wmctrl, attaches perf to the Emacs PID, then loops using xdotool to emulate keyboard presses while the window is visible and has focus for some number of iterations, then stops perf. On Mar 18, 2018 8:25 PM, "Stefan Monnier" wrote: > What is the best way to emulate interactive user input and reliably assess > the speed with which said input is processed? I guess what you want is to use execute-kbd-macro in an interactive Emacs session. Tho, currently it seems that execute-kbd-macro will end up short-circuiting the redisplay (normally redisplay is called when we call keyboard.c:read_char, but while inside a keyboard-macro this function will return the next "key" immediately without getting to the redisplay call). I think it would be valuable to make such an execution mode available (you can probably mimick it tolerably well by just adding explicit (redisplay t) calls between each command). Stefan --000000000000b751da0567ba572d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
You could use a bash script that selects the Emacs w= indow with wmctrl, attaches perf to the Emacs PID, then loops using xdotool= to emulate keyboard presses while the window is visible and has focus for = some number of iterations, then stops perf.
<= br>
On Mar 18, 2018 8:25 PM, "Stefan Monnier= " <monnier@iro.umontrea= l.ca> wrote:
> What is the best way to emulate interactive user = input and reliably assess
> the speed with which said input is processed?

I guess what you want is to use execute-kbd-macro in an interactive Emacs session.=C2=A0 Tho, currently it seems that execute-kbd-macro will en= d
up short-circuiting the redisplay (normally redisplay is called when we
call keyboard.c:read_char, but while inside a keyboard-macro this
function will return the next "key" immediately without getting t= o the
redisplay call).

I think it would be valuable to make such an execution mode available
(you can probably mimick it tolerably well by just adding explicit
(redisplay t) calls between each command).


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan



--000000000000b751da0567ba572d--