Repository navigation
Releases
v1.4.1 — Boundary hardening
Boundary hardening. v1.4.1 makes the v1.4.0 runtime safe at its numeric and lifecycle edges, adds the error value that the shared key space needed, and ships the demo workbook rebuilt from source inside a package that carries the Apache 2.0 LICENSE and NOTICE. No class member is added or removed, and every v1.4.0 call shape still compiles.
Behavior changes
ElapsedTimerange (#30). Any supplied duration from 0 to 1E+15 seconds formats exactly, with hours that never wrap at 24. Values outside that range are clamped to it. v1.4.0 raised a VBA overflow above 2,147,483,647 seconds.- Aligned method-3 start (#31). A strict alignment timeout releases the 1 ms timer period that attempt acquired before re-raising the original error.
- Statistics domain (#32). Observations above 1E+15 seconds raise
ERR_CPM_STATS_OUT_OF_DOMAIN. v1.4.0 accepted values up to 1E+300, so a large value could overflowStats_StdDev. - Calculation exemption (#33). The exemption lasts for the rest of the shared scope; an exempt scope never reads, writes or restores Calculation.
- TW instance keys (#35). The shared key counter is exact to 1E+15 keys and then raises the new
ERR_TW_KEY_SPACE_EXHAUSTED(vbObjectError + 2204), instead of overflowing after 2,147,483,647 keys. - Demo buttons (#73). A button built without an action macro shows a message naming it, instead of Excel's "Cannot run the macro".
Full detail in CHANGELOG.md.
Demo workbook and package
- The workbook is built from the tagged commit by
tools\Build-DemoWorkbook.cmd: import and compile, build the sheets, smoke-test all eight demo actions, remove the build machine's metadata, reopen, and package (#47). - It has a built Home page, corrected help text, a Run Benchmark action that shows
MeasureProcedure,MeasureBaseline, the evidence counts and the statistics, and failures reported on the results log instead of a VBA error dialog (#47). - It is published only inside
VBA-Performance-Manager-v1.4.1.zip, together withLICENSEandNOTICE(#72). Keep the three files together if you redistribute the workbook. v1.4.0 and earlier published the bare workbook; those assets are unchanged.
Assurance
- Regression suite at the exact tag: 93 cases, 861 assertions, 0 failures on Microsoft Excel 16.0.20527.20194, 64-bit. The four measurement usage examples also passed.
- Static gate: 31 checks, all passing at the tag, including compile safety (#45), pinned workflow actions (#46), fail-closed provenance (#51) and the pinned source/wiki release-state rules (#50).
- Certification record: docs/releases/v1.4.1/EVIDENCE.md.
Supported platform
Windows desktop Excel. v1.4.1 is executed and certified on Microsoft 365 Excel 64-bit only. The source keeps its pre-VBA7, VBA7 Win32 and VBA7 Win64 branches, but real Office 32-bit execution remains unverified; contributor-provided evidence is tracked in #29 for v1.5.0.
Known limitations
- Hosted CI runs static checks only; an automated Excel gate is tracked in #156.
- The workbook is built locally on the maintainer's Excel, not in CI, and the build is not byte-reproducible (#87). The tag and the assets are not signed (#43).
- See Known limitations in the README.
Upgrade
Re-import src/modules/M_cPM_TIMEWASTERS.bas, then src/classes/cPerformanceManager.cls, both from this tag, and compile. Callers that relied on ElapsedTime overflowing, or on Stats_* accepting values above 1E+15 seconds, see the clamped or rejected behavior above. See Installation.
Report vulnerabilities privately as described in SECURITY.md.
Full changelog: v1.4.0...v1.4.1
Note
The provenance block below is generated by release_provenance.py and is reproduced unchanged. Its general statement that the modules are imported by hand predates tools\Build-DemoWorkbook.cmd: for v1.4.1 the import, compilation and packaging were automated on the maintainer's machine. Its conclusion still holds, because that build is not byte-reproducible: the digest proves that a download is the file published here, and the tagged source stays authoritative.
🔐 Provenance
| Version | v1.4.1 |
| Commit | 189668851754ec10e4c86d02f2e12b16739a54a5 |
| Tag | v1.4.1 |
| Built | 2026-11-28 |
| Manifest tool | release_provenance.py 3.1.0 |
Certification
| Regression suite | 93 cases · 861 assertions · 0 failures |
| Excel | Microsoft Excel 16.0 build 20527 (16.0.20527.20194) |
| Bitness | 64-bit |
Note
On 64-bit Office, backend 2 compiles to GetTickCount64, so
RolloverSeconds is certified on its Win64 branch only. The 32-bit
wrap-correction branch is compiled out and was not exercised.
SHA-256
Required files
| File | SHA-256 |
|---|---|
src/modules/M_cPM_TIMEWASTERS.bas |
8976013788537fbf06041430c6d200f179353dc891f245ef3b25fe5b21a56429 |
src/classes/cPerformanceManager.cls |
962c356d16e7f1606510bd8f11829bc406d3b806f367714f881904a764b59665 |
Optional files
| File | SHA-256 |
|---|---|
test/M_cPM_Test.bas |
b439329a856489d7df799168791085d7e4e057dd23f8a6ec5108e5cd85a5a0f6 |
demo/M_cPM_DEMO.bas |
63a32fc8f789ea2a96bfde40bb026e2749e12bba119dd6f51d589b6d3829085d |
demo/M_cPM_USAGE_EXAMPLES.bas |
38124360c59eb34b7f071cb37b38cd264dffde6b4ae6abf6fe28a50fd48e6b45 |
demo/M_DEMO_BUILDER.bas |
1514db3f367f8634bac5986eb41bafad69591b5f689c2a8deda1bb03821bc96e |
Release assets
| Asset | SHA-256 |
|---|---|
VBA-Performance-Manager-v1.4.1.zip |
0411b6e167cb4e9556b8ddd11adce462f2120fb83399ecb3b5f39a2fed8f29ec |
Package contents
| File | SHA-256 |
|---|---|
PERFORMANCE MANAGER.xlsm |
60f999e65f86f4dfbd976eab66326424f5f07b8d05deda07458ac1b3ec02778c |
LICENSE |
c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 |
NOTICE |
d616f18a99714ebc45dbb7033162a93bfdb0d3de27d1160f0cb9dcb5beae5cd8 |
Source integrity
HEAD is the target of annotated tag v1.4.1, VERSION agrees with
the requested release identity, no tracked file is modified, and every
hashed source file matches its blob at v1.4.1. The package holds
exactly the workbook, LICENSE and NOTICE, and the latter two are
byte-identical to their blobs at v1.4.1.
What this establishes
| Claim | Established by |
|---|---|
| The published source files are the tagged ones | comparison against the tag |
| The manifest describes the tagged commit | HEAD equals the annotated tag target |
| The release version is the tagged source version | VERSION comparison |
| A downloaded file is the one published here | its SHA-256 |
| The package carries the tagged LICENSE and NOTICE | package verification against the tag |
| The suite passed in the stated environment | the certification block, asserted by the releaser |
Important
The workbook digest does not prove the workbook was built from this
source. No automated step produces it: the modules are imported by hand
and the file is saved, and the VBA editor reformats on import — stripping
alignment, appending blank lines — so extracted source could never match
the repository byte for byte even in principle.
The digest establishes that a download is the file published here, which
is a real and useful guarantee, and a different one.
The source files in this tag are authoritative. The workbook is a
convenience copy. Where they disagree, the source is right.
Verifying a download
PowerShell:
Get-FileHash -Algorithm SHA256 ".\VBA-Performance-Manager-v1.4.1.zip"
Expand-Archive ".\VBA-Performance-Manager-v1.4.1.zip" -DestinationPath ".\VBA-Performance-Manager-v1.4.1"
Get-FileHash -Algorithm SHA256 ".\VBA-Performance-Manager-v1.4.1\*"Compare the package hash with the release asset table and each extracted
file with the package contents table. Keep LICENSE and NOTICE with the
workbook when redistributing it.
The source files are text and are also in the repository at the commit
above, so git show <commit>:<path> gives the same bytes. The workbook is
only distributed inside the Release package, which is why its hash is
published here.
v1.4.0 — Measurement integrity
Measurement integrity. Repeated-measurement vectors now contain only samples taken on the backend you asked for, failures and backend rejections are counted separately and exposed on every harness member, the legacy overhead mean is derived from validated samples, and workbook qualification handles apostrophes.
Seven issues closed: #2, #23, #24, #25, #26, #27, #28.
Architecture scope
v1.4.0 has been executed and certified on Microsoft 365 Excel 64-bit. The source retains its Office 32-bit compatibility branches, but this release has not been executed or certified on a real 32-bit Office host. That assurance gap is tracked in #29 for v1.4.1.
Behavioral corrections
Existing calls continue to compile — every new parameter is trailing and optional — but four behaviors differ from v1.3.0.
- Fallback samples are rejected. A measured cycle whose requested backend fails to start falls back to backend 2 and is now discarded rather than retained. On a host that cannot start the requested backend, a non-strict run returns a shorter vector or raises
ERR_CPM_MEASURE_NO_VALID_SAMPLES. A rejected cycle does not dispatch the workload, so a procedure with side effects executes fewer times than requested. - Evidence outputs use a negative publication sentinel.
FailedReadsOutandRejectedSamplesOutread-1until a run reaches a publication point. A negative count means nothing was recorded, not that nothing failed. OverheadMeasurement_Secondsmay now raise. It previously always returned aDouble. It derives its mean from retained samples and raisesERR_CPM_MEASURE_NO_VALID_SAMPLESwhen no cycle survives.OverheadMeasurement_Textrendersundefined (...)for that one condition, carrying the original description so an all-fallback run reads differently from an all-failed one. Every other error propagates unchanged.
Full detail in CHANGELOG.md.
Installation
Import src/modules/M_cPM_TIMEWASTERS.bas then src/classes/cPerformanceManager.cls. The test, demo and example modules are optional. See Installation and Import.
The attached workbook is a prebuilt demo, not the runtime package. Verify it against the manifest below before opening it.
🔐 Provenance
| Version | v1.4.0 |
| Commit | a5390b4c6ca56ebbd87eca121b5167ee5dc09963 |
| Built | 2026-08-31 |
| Manifest tool | release_provenance.py 1.1.0 |
Certification
| Regression suite | 80 cases · 643 assertions · 0 failures |
| Excel | Microsoft 365 MSO, Version 2607, Build 16.0.20228.20188 |
| Bitness | 64-bit |
Note
On 64-bit Office, backend 2 compiles to GetTickCount64, so
RolloverSeconds is certified on its Win64 branch only. The 32-bit
wrap-correction branch is compiled out and was not exercised.
SHA-256
Required files
| File | SHA-256 |
|---|---|
src/modules/M_cPM_TIMEWASTERS.bas |
45cfd5d876b83b0cc7b16f5da853beeba7ac93939cd2ee645fc36b73eb584a33 |
src/classes/cPerformanceManager.cls |
96c06d8be7deaa509fc5e6bd54553aeaeeb621355cd75691325bcc7fc5316276 |
Optional files
| File | SHA-256 |
|---|---|
test/M_cPM_Test.bas |
8db55fd78c3ae9ee9f9650d2f76e7a5631ae81532e54422e0b08c5b694677819 |
demo/M_cPM_DEMO.bas |
fe64e1418927344595754702ca9ba84f5fbe93f89031f4734d7933bc5d5ea650 |
demo/M_cPM_USAGE_EXAMPLES.bas |
da3b2f5b679ef012c3e38e48d916d83a16ecda796a986211cdf311b5e2ae32bb |
demo/M_DEMO_BUILDER.bas |
776c5e0cca82749aca38850bd9e50f9b72ce79cf4c1267ee08b89723f0964598 |
Release assets
| Asset | SHA-256 |
|---|---|
PERFORMANCE MANAGER.xlsm |
4b2c4c4bedc31f70ab6dc48c8e0a0f7ab34db0412182e95b1fa7ad4220704fc5 |
Source integrity
Every hashed source file matches its blob at v1.4.0.
What this establishes
| Claim | Established by |
|---|---|
| The published source files are the tagged ones | comparison against the tag |
| A downloaded file is the one published here | its SHA-256 |
| The suite passed in the stated environment | the certification block, asserted by the releaser |
Important
The workbook digest does not prove the workbook was built from this
source. No automated step produces it: the modules are imported by hand
and the file is saved, and the VBA editor reformats on import — stripping
alignment, appending blank lines — so extracted source could never match
the repository byte for byte even in principle.
The digest establishes that a download is the file published here, which
is a real and useful guarantee, and a different one.
The source files in this tag are authoritative. The workbook is a
convenience copy. Where they disagree, the source is right.
v1.3.0 — Enforcement, named values, and honest statistics
Version 1.3.0 turns process discipline into enforcement, gives every value the
API takes a name, and closes a family of defects in which an invalid result was
indistinguishable from a valid one.
Backwards compatible with one deliberate exception, described under Behavioral
changes.
✅ Certification
| Regression suite | 72 cases · 511 assertions · 0 failures |
| Run date | 2026-08-16 |
| Excel | Microsoft 365 MSO, Version 2606, Build 16.0.20131.20152 |
| Bitness | 64-bit |
Coverage note. A run certifies one bitness. The 32-bit tick-count path is
compiled out on a 64-bit run, though its arithmetic is now shared with
UInt32ToDouble, which is verified at all four boundary values on whichever
bitness runs. 32-bit remains supported by construction and by shared
arithmetic, not execution-certified.
🛡️ One rule, applied everywhere
Four separate findings in this release turned out to be the same defect wearing
different clothes: a value that isn't a measurement, indistinguishable from one
that is.
- A failed read stored as a zero sample became the fastest run in a benchmark
- A backward-clock event clamped to zero reported status
OK - A strict-mode error left
LastReadStatusclaiming the last read succeeded - A contract accepting "any
Double()vector" permitted all of it
The class now has a single rule with a single channel: anything that isn't a
real measurement carries a non-OK status or is rejected at a named gate, and
every consumer branches on that one condition.
🛠️ Fixed
Failed reads no longer enter sample vectors
In non-strict mode a failed endpoint read returns zero, and the harness recorded
it. That zero became the minimum of the sample set, so a rare native failure was
indistinguishable from a genuinely fast iteration — and on small samples it moved
the median too. For MeasureOverhead_Samples it was worse: the minimum is the
published floor, so a stored zero wouldn't distort the answer, it would become it.
Failed reads are now excluded. Stats_Count may be less than Iterations,
and the shortfall is itself the measured-failure count.
A clamped backward clock no longer passes as valid
Elapsed_Validate clamped a backwards-moving source to zero and returned only a
number — "zero seconds, status OK", indistinguishable from a real measurement of
zero. It now reports cPM_ReadElapsedInvalid, so every caller that already
handles a failed read handles this too.
LastReadStatus no longer lies after a strict raise
Strict mode raised from inside the private reader, before the status could be
returned, and the public operation had already reset the status to cPM_ReadOK.
A caller who trapped the error and inspected the status was told the last read
succeeded. Read policy now lives in the public operations, which publish the
status then decide whether to fail.
Also fixed
Stats_IsContaminatedrejects a negativeCvThreshold, which previously
reported every sample set as contaminated- The checkpoint usage example set its run label before
StartTimer, which
clears it — so the shipped example produced an unlabelled report while
appearing to set one
✨ Added
Named values
cPM.StartTimer cPM_MethodQPC 'was: cPM.StartTimer 5
cPM.Pause 0.5, cPM_PauseSleep 'was: cPM.Pause 0.5, 1cPM_TimerMethod, cPM_PauseMethod, cPM_Error and cPM_TWError. Values are
unchanged, so numeric calls keep working.
The timer and pause enums share the numbers 1–4 and mean entirely different
things. Separate types makecPM.Pause 0.5, cPM_MethodTimeGetTimea compile
error rather than a silent wrong choice — something v1.2.0 could only warn
about in prose.
MeasureBaseline
Work = cPM.MeasureProcedure("MyWorkload", 30, 3)
Base = cPM.MeasureBaseline("cPM_BaselineEmpty", 30, 3)
Debug.Print "Net: " & (cPM.Stats_Median(Work) - cPM.Stats_Median(Base))Runs an empty procedure through the same dispatch path, so its median can
legitimately be subtracted. MeasureOverhead_Samples cannot — it never calls
Application.Run, so subtracting it removes the wrong quantity.
Harness failure reporting
S = cPM.MeasureProcedure("MyWorkload", 30, 3, cPM_MethodQPC, Failed, Status)
If Failed > 0 Then Debug.Print Failed & " read(s) failed."The harness measures on an isolated worker released before the vector returns,
so its outcome was previously unreachable.
Static analysis gate
tools/vba_lint.py runs twelve consistency checks over the exported sources on
every push and pull request. Six correspond to defects that actually reached this
repository during v1.2.0 — version drift, stale error sources, unbalanced
procedure blocks, reserved-word identifiers, committed conflict markers, and a
released changelog section being edited after its tag.
Release engineering
tools/release_provenance.py verifies every hashed source against the tag's blob
and exits non-zero on any difference. RELEASING.md records the process,
including the three mechanical failures that preceded a correct v1.2.0 tag.
Plus issue and pull request templates, and four measurement usage examples.
⚠️ Behavioral changes
Stats_CoefficientOfVariation now raises when the sample mean is not strictly
positive. Earlier releases returned zero.
For non-negative timing data a zero mean means every observation was zero — what
a run of failed non-strict reads produces. Returning zero made
Stats_IsContaminated report that run as perfectly stable, certifying a failed
measurement as clean.
This ships in a minor release because the old return value was not a useful
contract. It was an incorrect answer for an undefined quantity.
The statistics domain is now enforced. The routines accept finite,
non-negative timing observations; anything else raises
ERR_CPM_STATS_OUT_OF_DOMAIN, naming the offending index. Not because
Stats_Min breaks on a negative number — it doesn't — but because a negative
value means the vector isn't a timing vector, so every figure computed from it
describes something you didn't intend. Zero remains in domain.
MeasureProcedure qualifies an unqualified name with ThisWorkbook.
Application.Run previously resolved against the active workbook, so with
several open the harness could measure a same-named procedure in whichever one
you happened to have in front. Pass 'Other.xlsm'!Proc to measure elsewhere.
⚠️ Known limitations
MeasureProcedureexecutes the name it is given. A name from a worksheet
cell or a file is arbitrary code execution inside your project. Pass literals,
or names your own code controls.LastReadStatuscovers this instance's own reads. Harness outcomes arrive
throughFailedReadsOutandLastFailureStatusOut.- 32-bit Office is not execution-certified. Supported by construction and by
shared arithmetic; certification is a documented step for major releases. - Calculation control requires a stable open-workbook set. Where that doesn't
hold, the flag is exempted andTW_CalculationExemptedreports it. - Backend 1 cannot distinguish a backward clock adjustment from midnight
rollover. Use backend 5 where this matters.
📦 Installation
Import M_cPM_TIMEWASTERS.bas first, then cPerformanceManager.cls. The
class calls PM_TW_NewInstanceKey, so importing the class alone will not compile.
The demo workbook is attached to this release.
🔄 Upgrading from 1.2.0
Remove both modules, import the new module then the new class, recompile.
Check three things in your calling code:
- Do you call
Stats_CoefficientOfVariationon a vector that could have a zero
mean? It now raises. - Do you pass negative or synthetic values to any
Stats_*routine? They're now
rejected. - Do you call
MeasureProcedurewith a bare name targeting a different
workbook? Qualify it.
If none apply, no changes are needed.
Full changelog: CHANGELOG.md
🔐 Provenance
| Version | v1.3.0 |
| Commit | cbc7ccd8b9ea4988ad325b0dd4019d423c640798 |
| Built | 2026-08-16 |
| Manifest tool | release_provenance.py 1.1.0 |
Certification
| Regression suite | 72 cases · 511 assertions · 0 failures |
| Excel | Microsoft 365 MSO, Version 2606, Build 16.0.20131.20152 |
| Bitness | 64-bit |
Note
On 64-bit Office, backend 2 compiles to GetTickCount64, so
RolloverSeconds is certified on its Win64 branch only. The 32-bit
wrap-correction branch is compiled out and was not exercised.
SHA-256
Required files
| File | SHA-256 |
|---|---|
src/modules/M_cPM_TIMEWASTERS.bas |
23c41d49458161315159c3ef043571d5c1ffcfb230443a755059a3589d6623f8 |
src/classes/cPerformanceManager.cls |
e22b242a54130a19ac3329dcd527522fff5ef0ec193df52c46992a977b8d97f2 |
Optional files
| File | SHA-256 |
|---|---|
test/M_cPM_Test.bas |
48fc64f9d3b1b91786cd84332b5f553d71cf9c29bcc698e41b79f6d54482b8d9 |
demo/M_cPM_DEMO.bas |
fe64e1418927344595754702ca9ba84f5fbe93f89031f4734d7933bc5d5ea650 |
demo/M_cPM_USAGE_EXAMPLES.bas |
65904f72350cc178e75ebb076b97457d8731907c308d7154a7db126c1f11de19 |
demo/M_DEMO_BUILDER.bas |
776c5e0cca82749aca38850bd9e50f9b72ce79cf4c1267ee08b89723f0964598 |
Release assets
| Asset | SHA-256 |
|---|---|
PERFORMANCE MANAGER.xlsm |
5405e100bca16d61e35d5ac67c59cf3a4a2e80dbb63bb97934ef5bc17065005e |
Source integrity
Every hashed source file matches its blob at `v1....
v1.2.0 — Correctness hardening and a measurement harness
1.2.0 — 2026-08-16
Correctness hardening across the native timing reads, a distribution-aware measurement harness, and the removal of every magic error number from the codebase.
Regression suite: 63 cases, 431 assertions, 0 failures. Certified 2026-08-16 on Excel for Microsoft 365 MSO Version 2606 Build 16.0.20131.20152, 64-bit.
Added
Measurement and statistics
MeasureProcedure(Name, [Iterations], [Warmup], [Method]) — runs a named Public Sub repeatedly through Application.Run and returns the full per-run elapsed vector as Double().
MeasureOverhead_Samples([Iterations], [Warmup], [Method]) — per-cycle backend overhead as a sample vector. Its minimum is the observed empty-cycle floor: it includes the start read, the end read, class dispatch, and loop overhead, so it is not the clock's own granularity.
Statistics surface on any Double() vector: Stats_Min, Stats_Max, Stats_Mean, Stats_Median, Stats_Percentile, Stats_StdDev, Stats_CoefficientOfVariation, Stats_IsContaminated, Stats_Count, Stats_Text.
Contamination detection — Stats_IsContaminated reports when the coefficient of variation exceeds 0.25, and Stats_Text appends a warning so a noisy run cannot be mistaken for a precise one.
Read-status reporting
cPM_ReadStatus enum and the LastReadStatus property. In non-strict mode a failed read returns 0; without a status, a caller could not distinguish "zero seconds elapsed" from "no reading was obtained". Statuses: cPM_ReadOK, cPM_ReadQpcFailed, cPM_ReadSystemTimeFailed, cPM_ReadSystemTimeFormatInvalid, cPM_ReadFallbackToMethod2.
TW_CalculationExempted and PM_TW_CalculationExempted — report when Calculation control could not be honoured on the current host.
API
Optional RunLabel argument on StartTimer, so labelling a run is a single atomic call. Calling SetRunLabel before StartTimer is discarded by the session reset.
Testing
Three one-shot fault-injection seams — Test_ForceNextQPCReadFailure, Test_ForceNextSystemTimeReadFailure, Test_ForceNextSystemTimeFormatInvalid. Each is consumed by the read it affects, so a forced failure cannot leak into a later case.
22 regression cases, taking the suite from 41 to 63. New coverage: injected native-read failures on both backends, an injected wrong-format timeGetSystemTime result, Calculation baseline lifecycle, checkpoint capacity growth across ReDim Preserve boundaries, Class_Terminate cleanup, and 75 instance create/destroy cycles.
Changed
Backend dispatch consolidated into a single private reader, Elapsed_ComputeSeconds.
QPC_TryReadTick and SystemTime_TryReadMs are now the only places that touch the native timing APIs. Both report success as a return value and write their output parameter only on success.
StartTimer is transactional. It captures through Start_TryCapture and commits nothing until a valid start timestamp exists. No session is committed whose start value was not successfully read.
Checkpoint no longer overwrites the cached T2 and ET. A failed read abandons the capture entirely, leaving the checkpoint count and the last-checkpoint marker unchanged.
All 19 inline vbObjectError literals replaced by named constants. No bare offset appears anywhere in the code. Timing-method identifiers 1–6 remain numeric literals; tracked in #13.
UInt32ToDouble, Elapsed_Validate and RolloverSeconds are Friend rather than Private, so the suite can test their arithmetic directly.
Class_Initialize delegates to Checkpoint_ClearState.
Report column positions are named constants (PM_RPT_COL_DELTA, PM_RPT_COL_CUMULATIVE).
The demo workbook is distributed as a Release asset rather than versioned in the repository.
Fixed
A failed QPC start read no longer commits a zero-based session. Non-strict mode previously committed method 5 with a QPC start of zero; a subsequent successful end read then measured from zero and reported a value resembling machine uptime. Non-strict now binds method 2 before any state is committed and records cPM_ReadFallbackToMethod2; strict raises with the previous session untouched.
A failed method-4 read no longer becomes a large positive duration. Get_SystemTimeMs returned 0 on failure; that sentinel produced a negative delta which rollover correction then "fixed" by adding the 32-bit wrap period, yielding roughly 4,294,967 seconds. Every read is now validated before any subtraction or rollover correction.
A failed elapsed read no longer destroys the last known good measurement.
Shared-TW instance keys no longer derive from ObjPtr(Me). VBA reuses heap addresses, so a session left by a destroyed instance could be silently inherited by an unrelated instance at the same address.
TW_Turn_OFF commits m_Except only after PM_TW_BeginSession succeeds.
The Calculation baseline no longer conflates "unknown" with "Automatic". A scope beginning with no workbook stored a synthetic xlCalculationAutomatic, which a later apply could write over a real workbook's setting. g_TW_CALCULATION_VALID now tracks whether a baseline was genuinely captured, separately from its value.
Negative elapsed times are no longer returned silently. On Win64 backend 2, RolloverSeconds returns 0, so a negative value passed through unchanged. Strict raises ERR_CPM_NEGATIVE_ELAPSED; non-strict clamps to zero. Backend 5 skips the check deliberately.
Pause methods 3 and 4 no longer overshoot by up to a second. Now and Application.Wait are second-granular and 1/86400 is not exactly representable, so a coarse loop could wait a full extra tick. Both coarse loops are now bounded by the same elapsed measurement the trailing guard uses. Consequence: below roughly two seconds, method 3 issues no coarse wait and behaves like method 2.
Error sources naming M_cPM_ReportHelpers and M_cPM_RegressionTests — modules that have never existed — corrected.
Removed
QPC_TryGetNextTimestampTick — around 100 lines of dead code, never called, and a near-duplicate of the live alignment helper.
Documentation
TW_InstanceKey's header rewritten; it documented the removed ObjPtr approach in full.
Four procedure header titles corrected where they did not match their names.
New header sections: Elapsed-time validation policy, Instance key policy, Host-state policy, Calculation baseline validity, Stable-host invariant, Error numbers.
README and wiki claims qualified where they overstated what the implementation guarantees: backwards-clock detection scoped to the backends that support it, "resolution floor" renamed to "observed empty-cycle floor", the unsupported Application.Run cost figure removed, and the incorrect baseline-subtraction guidance replaced. A dispatch-matched baseline helper is tracked in #7.
The test module's M_DEMO_BUILDER dependency documented.
Known limitations
Calculation control requires a stable open-workbook set for the life of a suppression scope. The genuinely workbook-less paths cannot be exercised by a suite running inside a workbook and remain manually verified only.
MeasureOverhead_Samples is not a matched baseline for MeasureProcedure, because it does not dispatch through Application.Run.
Backend 1 cannot distinguish a backward clock adjustment from midnight rollover.
Rollover correction handles a single wrap.
v1.1.0 — Checkpoints & Reporting
v1.1.0 — Structured Checkpoints and Reporting
This release extends cPerformanceManager beyond timing and environment control by adding structured checkpoint/reporting capabilities, while also refreshing documentation, examples, demo support, and regression coverage.
Highlights
- Added structured checkpoints within an active timing session
- Added run labels for checkpointed runs
- Added array-based checkpoint export via
ReportAsArray - Added human-readable checkpoint export via
ReportAsText - Added explicit checkpoint reset support via
ClearCheckpoints - Preserved the existing session-bound timing model
- Expanded the regression suite to cover the new reporting surface
- Refreshed the wiki, examples, and project documentation
New / enhanced capabilities
Checkpoint and reporting support
The class now supports structured sub-measurement within a timing session through:
SetRunLabelCheckpointCheckpointCountReportAsArrayReportAsTextClearCheckpoints
This makes it easier to instrument multi-step workflows such as:
- load
- transform
- write-back
- recalculate
rather than measuring only a single total elapsed value.
Improved reporting workflow
You can now:
- capture named checkpoints
- attach optional notes
- export a machine-readable 2D array
- produce a readable text report for diagnostics and review
Regression and validation improvements
The regression suite has been expanded and refreshed to better cover:
- timing/session behavior
- strict vs non-strict validation
- diagnostics and overhead helpers
- pause methods
- TW shared-state lifecycle
ResetEnvironmentidempotence- checkpoint / reporting behavior
This release improves confidence in both the legacy timing surface and the newer reporting surface.
Documentation refresh
Documentation has been updated across:
- README
- wiki pages
- usage examples
- regression-test coverage notes
The documentation now better reflects the current public surface of the class and its companion modules.
Compatibility / notes
- Windows-oriented design remains unchanged for API-backed timing methods
M_cPM_TIMEWASTERS.basremains required- Existing timing workflows remain valid
- Method
5(QPC) remains the recommended benchmark path
Public surface added / emphasized in this release
Checkpoint / reporting
SetRunLabelCheckpointCheckpointCountReportAsArrayReportAsTextClearCheckpoints
Existing core capabilities retained
StartTimerElapsedSecondsElapsedTimePauseResetEnvironment- shared TW suppression
- overhead / diagnostics helpers
Upgrade note
This is a backward-compatible feature expansion for normal usage patterns.
If you are already using cPerformanceManager for:
- elapsed-time measurement
- benchmark harnesses
- Excel environment suppression
you can continue to do so unchanged, while optionally adopting the new checkpoint/reporting features for richer instrumentation.
v1.0.0 — First public baseline
v1.0.0 — First public baseline
This first public release establishes cPerformanceManager as a structured execution and performance-control component for Excel VBA on Windows.
It provides:
- a session-bound timing model
- multiple timing backends
- numeric and formatted elapsed-time output
- benchmark-overhead helpers
- pause / wait support
- shared Excel “time-waster” suppression
This release also includes the surrounding project assets needed to evaluate and adopt the component more easily:
- source modules
- demo / build modules
- usage examples
- regression tests
Highlights
- Session-bound timing engine built around StartTimer, ElapsedSeconds, and ElapsedTime
- Six supported timing methods:
- Timer
- GetTickCount / GetTickCount64
- timeGetTime
- timeGetSystemTime
- QueryPerformanceCounter (QPC) — default and recommended
- Now() * 86400
- Benchmark and diagnostic helpers, including:
- elapsed-time formatting without taking a second timing sample
- overhead measurement
- timer/source diagnostics
- Execution-control utilities, including pause / wait helpers and explicit environment cleanup
- Shared Excel “time-waster” suppression for both cleaner benchmark runs and general Excel/VBA performance improvement in heavy procedures
- Companion modules included for demo sheet generation, usage examples, and regression testing
Included in this release
- src/cPerformanceManager.cls
- src/M_cPM_TIMEWASTERS.bas
- examples/M_cPM_DEMO.bas
- examples/M_cPM_USAGE_EXAMPLES.bas
- examples/M_DEMO_BUILDER.bas
- test/M_cPM_TEST.bas
Recommended usage
For most benchmark scenarios, the recommended default path is:
- method 5 (QPC)
- ElapsedSeconds for numeric measurement
- ElapsedTime for readable reporting
- ResetEnvironment for deterministic cleanup
Notes
This release targets Excel VBA on Windows.
API-backed timing methods depend on the Windows host environment and the required companion TW module.
cPerformanceManager is positioned as part of a broader Excel VBA Runtime Framework, where it acts as the execution engine for performance instrumentation, runtime control, repeatable benchmarking, and Excel environment optimization.