simplemage / module-indexer-benchmark

simplemage/module-indexer-benchmark

SimpleMage Indexer Benchmark — dev-only verification harness for SimpleMage_CategoryProductIndexer: before/after benchmark commands, metric collectors, MD5 correctness verification. Staging/dev use only.

magento2-module Compatibility: 2.4.7-2.4.9 Code Quality: Fail Tests: N/A Security: Pass MIT

Are you the maintainer of simplemage?

Packagento pulls simplemage's Composer packages from the public registry so buyers can find them here.

Claim the namespace to take ownership, publish new releases directly, and start charging for premium versions.

Claim this namespace →

SimpleMage - Indexer Benchmark & Verification Harness

Dev-only companion module for SimpleMage_CategoryProductIndexer. It measures
the before/after performance of the catalog_category_product indexer on YOUR
database and proves the index output is byte-for-byte identical to core
Magento - every row, every column, every store view, MD5-compared.

⚠️ Staging / development environments only. This module resets indexer
state, flushes caches and dumps index tables. Never install it on production.
Nothing ever leaves your server - all results are local files under
var/simplemage-bench/.

Requirements

  • Magento Open Source 2.4.6 - 2.4.9 or Mage-OS 1.x - 3.x, PHP 8.2 - 8.5
  • A staging copy of your store database (the bigger the catalog, the better)
  • The SimpleMage_CategoryProductIndexer module files in app/code/ (disabled at first!)

Beta test - 5 steps

# 0. Install the harness (SimpleMage_CategoryProductIndexer stays DISABLED for now)
bin/magento module:enable SimpleMage_IndexerBenchmark
bin/magento setup:upgrade && bin/magento setup:di:compile

# 1. BASELINE - measure core Magento on your data
bin/magento simplemage:bench:run -i catalog_category_product -m baseline
bin/magento simplemage:bench:snapshot -i catalog_category_product -l core

# 2. Enable the SimpleMage indexer module
bin/magento module:enable SimpleMage_CategoryProductIndexer
bin/magento setup:upgrade && bin/magento setup:di:compile

# 3. CANDIDATE - measure the SimpleMage path on the same data
bin/magento simplemage:bench:run -i catalog_category_product -m candidate
bin/magento simplemage:bench:snapshot -i catalog_category_product -l simplemage -d core

# 4. Full report: timings + byte-identity verdict
bin/magento simplemage:bench:compare -i catalog_category_product \
    --snapshot-baseline=core --snapshot-candidate=simplemage

That's it. Step 3's -d core already prints the MD5 verdict
(Snapshots MATCH / DIFFER); step 4 adds the side-by-side metric table.
Please send us the full console output of step 4 (and step 3 if it reported
DIFFER).

🔒 Do not change the catalog between step 1 and step 3 (disable cron) -
any product/category change in between produces a false DIFFER.

Optional: partial-reindex benchmark

Partial (MView) reindex is the production hot path - worth measuring too.
The same seed guarantees baseline and candidate use the identical ID sample:

# before enabling the module:
bin/magento simplemage:bench:run-partial -i catalog_product_category -c 100 -m baseline
# after enabling:
bin/magento simplemage:bench:run-partial -i catalog_product_category -c 100 -m candidate

Commands

Command Purpose
simplemage:bench:run -i <indexer> -m baseline|candidate [-l label] [--skip-reset] Full reindex with metric collection (wall clock, peak memory, SQL query count/time, slow queries, lock waits, tmp disk tables)
simplemage:bench:snapshot -i <indexer> -l <label> [-d <other-label>] Deterministic full-content dump of the live index tables; with -d, saves AND diffs against an earlier label (MD5 + line diff)
simplemage:bench:compare -i <indexer> [-l label] [--snapshot-baseline=A --snapshot-candidate=B] [--strict] [--threshold=10] Baseline vs candidate metric table, regression flags, optional snapshot verdict
simplemage:bench:run-partial -i <indexer> -c <n> -m <mode> [--seed 42] [--ids 1,2,3] Partial reindex (reindexList) benchmark on a deterministic ID sample

How the correctness check works

simplemage:bench:snapshot dumps every row of every
catalog_category_product_index_store* table
(the live, post-switch tables -
excluding _replica/_tmp/_outdated) in canonical order with all columns
serialised per line, then compares files via streaming MD5. A MATCH means the
SimpleMage indexer produced literally identical data to core on your catalog.
No sampling, no aggregation limits, table-prefix aware.

License

MIT - see LICENSE.

No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
v1.0.0 stable Fail Magento 2.4.7-2.4.9 Details 2026-06-12 17:05:59

Requires 4

Package Constraint
magento/framework >=103.0.6
magento/module-catalog >=104.0.6
magento/module-indexer >=100.4.6
php ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

Suggests 1

Package Reason
simplemage/module-category-product-indexer The indexer rewrite this harness benchmarks and verifies (baseline mode works on plain core without it)

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Fail 64 3 errors, 61 warnings (ruleset: Magento2), 1 auto-fixable with phpcbf
PHPMD Warning 26 26 rule violations (UnusedPrivateField:26)
Cpd Pass 0
Composer validate Info 3 valid; 3 advisory notes (composer validate --strict)

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 7 7
2.4.8 7 7
2.4.9 7 7

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0

More from simplemage

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.