diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-07-25 10:37:23 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-07-25 11:57:53 +0200 |
| commit | e83cc6536f2b536693fe424c080ce635a65993f7 (patch) | |
| tree | 93a72eaf76677e8e7d428777b3d51b83b65089de /lua/cursor.lua | |
| parent | ee0edf4e662c588075b53185987183343f27621c (diff) | |
| download | vis-e83cc6536f2b536693fe424c080ce635a65993f7.tar.gz vis-e83cc6536f2b536693fe424c080ce635a65993f7.tar.xz | |
Add basic text benchmarking infrastructure
This adds a new bench command to the interactive shell initially used
for fuzzing with AFL. The syntax is:
> b op pos [count]
where op is either:
i (insert)
d (delete)
r (replace)
m (set/get mark)
and pos is one of:
^ (start)
| (middle)
$ (end)
% (random)
- (consecutively from end to start)
+ (consecutively from start to end)
~ (stripes with fixed distance)
Hence the following would perform 100 insertions at random positions:
> b i % 100
Note however, that the used pseudo-random number generator is currently
not seeded, meaning multiple execution will start with the same state,
making them comparable.
Timing is currently performed using monotonic clock_gettime(2).
Diffstat (limited to 'lua/cursor.lua')
0 files changed, 0 insertions, 0 deletions
