all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joseph Garvin <k04jg02@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Latency profiling?
Date: Sun, 18 Mar 2018 21:01:55 -0500	[thread overview]
Message-ID: <CAH=MJ4ZVD7tvnXgp3qTSN8Tp2mZ81oR=ft_eh59-kFHMvj235w@mail.gmail.com> (raw)
In-Reply-To: <jwvfu4wq3fj.fsf-monnier+gmane.emacs.devel@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]

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" <monnier@iro.umontreal.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.  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

[-- Attachment #2: Type: text/html, Size: 1486 bytes --]

  reply	other threads:[~2018-03-19  2:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-18 20:29 Latency profiling? Sebastian Sturm
2018-03-18 20:46 ` Eli Zaretskii
2018-03-19  1:25 ` Stefan Monnier
2018-03-19  2:01   ` Joseph Garvin [this message]
2018-03-24 17:23     ` Sebastian Sturm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH=MJ4ZVD7tvnXgp3qTSN8Tp2mZ81oR=ft_eh59-kFHMvj235w@mail.gmail.com' \
    --to=k04jg02@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.