• webmail/tests/timing.sh

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Nov 20 15:25:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/2c0bb6770f68afeb2be0a6c9
    Modified Files:
    webmail/tests/timing.sh
    Log Message:
    Web mail client: timing script also times the requests that change mail

    webmail/tests/timing.sh, a tool a sysop runs against their own server with their own account, can now also time the write requests, 20 runs each
    (median, fastest, slowest, against the plan's budgets):

    - -w: star one message (turned back after each run), move it from the
    Inbox to a folder and back, the move followed by folder.list, draft.save
    of a 2 KB body and draft.attach of one 1,000,000-byte piece (the size the
    client sends; removed again after each run).
    - -S <address> [-N sends]: draft.send of a small message. It sends real
    mail, so it is off unless asked for, the address must be one of the
    signed-in account's own (checked against the addresses it may send
    from), and it sends -N messages (default 3), saying that they will
    arrive.

    The writes are safe on a real mailbox: the script uses the oldest read
    Inbox message (at least two days short of the Inbox's age limit, so moving
    it back cannot be refused), restores its star and folder, skips the moves
    when the mailbox is within 1 MB of its storage limit (a move into a folder could remove old Trash), creates its own folder and draft with names that
    say they are safe to delete and removes them, says what it will change
    before starting and asks when run from a terminal (-y skips that). On an
    error or an interrupt it puts things back; it finds the message by looking
    in its test folder, so a run stopped in the middle of a move is undone too,
    and it prints whatever it could not put back. Checked on a scratch server
    with SIGINT to the whole process group at four points of a run.

    Every request now goes out with an empty Expect header: for a body over
    1 MB curl sends "Expect: 100-continue", which browsers do not, and waits a second for an answer the web server does not give, which made draft.attach
    look 1 s slower than it is.

    The read rows and the behavior without -w and -S are unchanged.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>