Previously keyboard input was no longer input after manually running
the integration tests. This change fixes this by restarting ibus after
the tests. However, we only want to do that if the ibus instance we
started for the tests got killed. The cleanup script might get called
multiple times, so we need this check.
There are three main operations during correction-search:
- replay of old results, if applicable
- generation of new corrections
- generation of predictions rooted on found corrections
Each type naturally has a different 'expected' runtime... so we now make buckets for each. We can then use stats principles to detect outliers on each level. (Mixing them all together = higher variance, thus worse detection.)
Also adds a full set of unit tests at 100% coverage for the new implementation.
Fun detail - in practice, when running all of the unit tests on my personal machine, it's able to pick up a fair few 1-5 ms outliers during the prediction-oriented tests! We previously lacked the resolution to detect those smaller-end cases.
This is work toward #3580, but not the final resolution of it.
While working on #3580, I was noticing some odd behavior after later changes and discovered that the assumption underlying the correction-batching behavior is invalid. It would also complicate other aspects of #3580, so the simplest answer is likely to remove it.
Moves the kpj test fixtures into developer-utils, moves from let to
const in code where required by eslint, and reduces the coverage
threshold in order to get tests to pass for developer-utils.
Currently, keys must be a UTF-16 code unit or a virtual key. Non-BMP
characters are unsupported. Technically, there is space available in the
.kmx `COMP_KEY` structure to accommodate UTF-32 codepoints, from
kmx_file.h:
KMX_WORD_unaligned Key;
KMX_WORD_unaligned _reserved;
However, the utility of this is almost nil, as it is very unlikely we
will encounter base keyboards (for mnemonic layouts) that generate any
characters outside the BMP, so there is little value in adding support
for this at this time.
The compiler will generate an error if this is encountered.
Fixes: #11643
# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
# Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
# Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes