Repository navigation
Conversation
Duel (https://github.com/sferik/duel-ruby) runs the benchmarks in duel/ on the branch and on master side by side, and fails a pull request that is slower or allocates more. The 44 benchmarks cover queries over a socket to a PostgreSQL server of each worker's own (exec, exec_params, exec_prepared, COPY in and out), reading results in memory (values, getvalue, each, each_row, tuples, field names), the type maps, the text and binary coders on their own, escaping, and parsing connection parameters. Each version compiles its own extension (c.build). The duel-postgresql plugin needs a released pg, so Duel is in an optional Gemfile group. Checked by comparing master with itself three times, and with planted regressions: the Integer decoder without its fast path failed 6 benchmarks on instructions, and an extra rb_str_dup in the String decoder failed 13 on allocations.
pg's code paths differ by system, and Linux's was the only one Duel measured. The Perf workflow runs on Linux, macOS and Windows now, each saying what it found in a report of its own, and the Perf comment workflow comments with all three. On Linux and macOS, it calls Duel 0.2.0's reusable workflow, so the copy of its steps is gone. It grants contents: write, which GitHub checks every job of the reusable workflow against, though none of the jobs that write is turned on here, and the Duel job still only reads. The reusable workflow's steps are Unix shell's, so the Windows job runs the same ones itself, in bash, with what pg's build needs there as source-gem.yml has it (MSYS2's gcc, and PostgreSQL's binaries, for libpq). Its servers are the runner's own PostgreSQL's, whose initdb drops the rights of the runner's user, an administrator, as postgres needs: the binaries' doesn't. The Perf comment workflow calls Duel's reusable one too.
Duel 0.3.0's reusable workflow runs on Windows (its steps in bash, with setup-after-ruby for what needs Ruby's devkit), so the Windows job is a call of it like Linux's and macOS's, in place of a copy of its steps: setup downloads PostgreSQL's binaries, for libpq, and names the runner's own postgres, in PGBIN, for the servers (DUEL_POSTGRESQL_SERVER, as duel-postgresql 0.3.0 names what was DUEL_POSTGRESQL_BIN, a directory), and setup-after-ruby installs MSYS2's gcc and puts the devkit's directories, then libpq's, on the PATH. Each Duel job grants contents: read alone, now that the jobs that write for a push are a reusable workflow of Duel's own, which each platform's push calls, with its report. And the Duel jobs no longer take accept-label, as Duel reads it from .duel.rb itself. The Gemfile's optional group asks for Duel 0.3.0 and duel-postgresql 0.3.0.
Owner
Author
|
Done: it ran. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A test of ged/ruby-pg's Perf workflow with Duel 0.3.0, the Windows job now a call of Duel's reusable workflow. I'll close it once it runs.