Skip to content

Fix timeout units and index stats width - #329

Draft
tanmay-9 wants to merge 3 commits into
qlever-dev:mainfrom
tanmay-9:fix-timeout-units-and-index-stats-width
Draft

Fix timeout units and index stats width#329
tanmay-9 wants to merge 3 commits into
qlever-dev:mainfrom
tanmay-9:fix-timeout-units-and-index-stats-width

Conversation

@tanmay-9

@tanmay-9 tanmay-9 commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

The --timeout of qlever start is passed on to the server, which accepts a unit (ns, us, ms, s, min, h). The commands that need the timeout seconds as a plain number, however, obtained it by cutting off the last character of the string, so anything but seconds broke them.

With this change, --timeout is validated when it is parsed, so an unusable value is rejected right away, with a message naming the units that are accepted, instead of failing later in whichever command happens to need a number. The conversion to whole seconds now happens in one place for all commands, and a sub-second timeout becomes one second rather than zero, so it stays a timeout.

On the side, the headings of qlever index-stats are now padded to the width of the longest heading (at least the previous 25 characters, so the QLever output is unchanged) and to the same width in the time and the space part, so that the colons still line up for engines whose phases and file groups have longer names.

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.

1 participant