Skip to content

feat(bash/blesh): use _ble_exec_time_ata for duration even in bash < 5#1940

Merged
ellie merged 1 commit into
atuinsh:mainfrom
akinomyoga:blesh-exec-time
Apr 10, 2024
Merged

feat(bash/blesh): use _ble_exec_time_ata for duration even in bash < 5#1940
ellie merged 1 commit into
atuinsh:mainfrom
akinomyoga:blesh-exec-time

Conversation

@akinomyoga

Copy link
Copy Markdown
Contributor

See the commit message for the description. This applies the change suggested by @gvlassis in #1484 (comment).

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

Bash < 5.0 doesn't support the high-resolution clock EPOCHREALTIME, so
ble.sh uses the builtin command `time` to measure the execution times
in Bash < 5.0.  This has a lower resolution of milliseconds but still
more accurate than Atuin's measurent because Atuin's measurement
includes the spawn cost of Atuin, which is typically larger than a
millisecond.

Reported-by: Georgios Vlassis <https://github.com/gvlassis>
Reference: atuinsh#1484 (comment)

@ellie ellie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! 👏

@ellie ellie merged commit 0da8d34 into atuinsh:main Apr 10, 2024
@akinomyoga

Copy link
Copy Markdown
Contributor Author

Thanks!

@akinomyoga akinomyoga deleted the blesh-exec-time branch April 10, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants