[
 {
  "id": "java-warmup",
  "title": "Provisional (Java warm-up)",
  "match": {
   "stack": "java-.*",
   "test": "T[1-6]"
  },
  "text": "Measured with a fixed 5-iteration warm-up that did not reach steady state: the JIT compiler was still working during measured iterations (spread within a process 26-45%). A rerun with adaptive warm-up (until 3 iterations agree within 5%) is queued; treat these Java figures as provisional."
 },
 {
  "id": "tls-p521",
  "title": "MariaDB TLS key exchange",
  "match": {
   "server": "maria",
   "test": "T1",
   "variant": "tls.*"
  },
  "text": "MariaDB 12.3 negotiates ECDH on P-521 (secp521r1); Percona Server uses P-256. Much of the extra client CPU per TLS connect on MariaDB is that server-side choice, not the driver."
 },
 {
  "id": "tls-noca",
  "title": "TLS without a CA loads the system trust store",
  "match": {
   "test": "T1",
   "variant": "tls|tls-resume",
   "stack": "c-.*|py-mysqlclient|py-mysql-connector-c|py-mariadb"
  },
  "text": "With no CA configured, libmysqlclient and MariaDB Connector/C load and parse the full system CA bundle (120 certificates) on every connection although they verify nothing."
 },
 {
  "id": "auth-plugin",
  "title": "Different default authentication",
  "match": {
   "test": "T1",
   "variant": "tcp|socket"
  },
  "text": "Each server uses its own default authentication: Percona Server caching_sha2_password (SHA-256 plus an extra round trip on the fast path), MariaDB mysql_native_password. Part of the Percona-vs-MariaDB difference in plain connect cost comes from this, not the driver."
 },
 {
  "id": "connc-usleep",
  "title": "Connector/C sleeps after connect()",
  "match": {
   "test": "T1",
   "stack": "c-mariadb-connc|py-mariadb"
  },
  "text": "MariaDB Connector/C calls usleep(1) after every connect() (about 50 µs on Linux). This adds wall time per connection, not CPU."
 },
 {
  "id": "json-conversion",
  "title": "Percona converts JSON on every read",
  "match": {
   "server": "ps",
   "test": "T5",
   "variant": ".*-doc(\\+tls|-parse)?"
  },
  "text": "Percona Server (like MySQL) stores JSON in a binary format and converts it to text on every read: about 13× the server CPU of the same bytes as LONGBLOB, and ~10% larger output. The slower send makes most clients spend more CPU per KB than reading the same documents from MariaDB, which stores JSON as text."
 },
 {
  "id": "py-mariadb-json-bytes",
  "title": "Returns JSON as bytes on Percona",
  "match": {
   "server": "ps",
   "stack": "py-mariadb",
   "test": "T5",
   "variant": ".*-doc(\\+tls|-parse)?"
  },
  "text": "MariaDB Connector/Python returns Percona's JSON column as raw bytes (no UTF-8 decoding) but MariaDB's JSON column as a decoded string. Not comparable with other drivers or across servers."
 },
 {
  "id": "java-json-unexplained",
  "title": "Unexplained (Java JSON reads)",
  "match": {
   "server": "ps",
   "stack": "java-.*",
   "test": "T5",
   "variant": ".*-doc(\\+tls)?"
  },
  "text": "Both Java drivers read Percona's JSON column with less CPU per KB than the same bytes as BLOB, the opposite of every other language. Not yet explained; to be rechecked after the Java warm-up rerun and profiled if it persists."
 },
 {
  "id": "libmysqlclient-tls-reads",
  "title": "Two TLS reads per row",
  "match": {
   "stack": "c-libmysqlclient",
   "test": "T3",
   "variant": ".*\\+tls"
  },
  "text": "libmysqlclient issues two SSL_read calls per row (2M for 1M rows; MariaDB Connector/C about 700), so TLS doubles its per-row cost."
 },
 {
  "id": "bulk-mariadb-only",
  "title": "MariaDB-only bulk protocol",
  "match": {
   "test": "T6",
   "variant": "batch",
   "stack": "c-mariadb-connc|py-mariadb|java-mariadb-j"
  },
  "text": "On MariaDB this uses the bulk-execute protocol (COM_STMT_BULK_EXECUTE). Percona Server does not have it, so the driver falls back to one execute per row there, or the test is n/a."
 },
 {
  "id": "connectorj-batch-default",
  "title": "Connector/J batch defaults",
  "match": {
   "stack": "java-connector-j",
   "test": "T6",
   "variant": "batch"
  },
  "text": "With default settings Connector/J's executeBatch() sends one INSERT per row; rewriteBatchedStatements=true (tuned) rewrites the batch into multi-row INSERTs."
 },
 {
  "id": "go-ed25519-bug",
  "title": "Fails, not unsupported",
  "match": {
   "server": "maria",
   "stack": "go-sql-driver",
   "test": "T1",
   "variant": "tcp@ed25519"
  },
  "text": "go-sql-driver advertises ed25519 support but fails against MariaDB 12.3 with \"malformed packet\" (go-mysql works with the same account). A driver bug, not a missing feature."
 },
 {
  "id": "go-interpolate",
  "title": "Three round trips per parameterized query",
  "match": {
   "stack": "go-sql-driver",
   "test": "T2|T6",
   "variant": "param|multiparam",
   "config": "default"
  },
  "text": "Without client-side interpolation (go-sql-driver: interpolateParams=true, tuned) each parameterized call prepares, executes and closes a server-side statement."
 },
 {
  "id": "go-mysql-execute-args",
  "title": "Three round trips per parameterized query",
  "match": {
   "stack": "go-mysql",
   "test": "T2",
   "variant": "param",
   "config": "default"
  },
  "text": "go-mysql's Conn.Execute(sql, args...) prepares, executes and closes a server-side statement on every call."
 },
 {
  "id": "pymysql-connect",
  "title": "Slow connect, cause not yet profiled",
  "match": {
   "stack": "py-pymysql",
   "test": "T1",
   "variant": "tcp|socket|tcp@ed25519"
  },
  "text": "PyMySQL spends about 3.7 ms of CPU per plain connection, on TCP and Unix socket alike and on both servers, roughly 80× libmysqlclient. Where the time goes will be shown by the profiling pass."
 },
 {
  "id": "noisy",
  "title": "Higher run-to-run spread",
  "auto": "cv_pct > 5",
  "text": "The 5 processes for this result differ by more than 5% (coefficient of variation). Small differences against it are not meaningful."
 }
]