All Notable changes to bakame/stackwatch will be documented in this file.
Next - Qandala - 2026-XX-XX
- BC BREAK: Rename
stack_cdumptostack_call_dump - BC BREAK: Rename
stack_bdumptostack_bench_dump - BC BREAK: Rename
stack_rdumptostack_report_dump - BC BREAK: Rename
stack_cddtostack_call_dd - BC BREAK: Rename
stack_bddtostack_bench_dd - BC BREAK: Rename
stack_rddtostack_report_dd - BC BREAK: Rename
Stack::dumpCalltoStack::callDump - BC BREAK: Rename
Stack::ddCalltoStack::callDd - BC BREAK: Rename
Stack::dumpReporttoStack::reportDump - BC BREAK: Rename
Stack::ddReporttoStack::reportDd - BC BREAK: Rename
Stack::benchmarktoStack::bench - BC BREAK: Rename
Stack::dumpBenchmarktoStack::benchDump - BC BREAK: Rename
Stack::ddBenchmarktoStack::benchDd
- Call Location calculation to include the correct call start path.
- None
- None
0.16.1 - Pointe-Noire - 2026-02-07
- None
- Version class
- Simplify PSR-3 usage (remove nullable calls)
- None
- None
0.16.0 - Pointe-Noire - 2026-02-07
PerformanceAssertionsto align withAggregatedMetricsusage and generation.Report::iterations()method is added.StackWatchExceptionNoMetricSelectedexceptions
- BC BREAK: improve
Reportgeneration validation and adds missingReport::iterations()method AggregatedMetrics::ddandStatistics::ddimproved implementation- BC BREAK: global functions are namespaced
- Improve Github actions
- BC BREAK: exceptions are now all inheriting from a base
StackWatchException
- None
MetricsAssertionstrait replaced by thePerformanceAssertionstrait- BC BREAK: Enums can no longer be profiled using the CLI instance as it was making no sense.
0.15.0 - Ouagadougou - 2025-09-09
- BC BREAK: Rename
stacktostack_call - BC BREAK: Rename
stack_dumptostack_cdump - BC BREAK: Rename
stack_ddtostack_cdd - BC BREAK: Rename
stack_metricstostack_bench - BC BREAK: Rename
stack_mdumptostack_bdump - BC BREAK: Rename
stack_mddtostack_bdd - BC BREAK: Rename
Stack::executetoStack::call - BC BREAK: Rename
Stack::metricstoStack::benchmark - BC BREAK: Rename
Stack::dumpMetricstoStack::dumpBenchmark - BC BREAK: Rename
Stack::ddMetricstoStack::ddBenchmark - Added
AggregatedMetricsto distinguish raw and calculated metrics - Added
Report::rowto make theReportpublic API consistent - Added
Report::columnto have a single source of truth for statistics generation - Added
OtlExporterto export data to an Open Telemetry server - Added
MetricTypeEnum to list possible metrics supported by the package - Added
Profilermissing aggregated related methods. - Added
MetricsAssertionsmissing aggregation methods preset - Added
CallbackDumperto simplifyddimplementation - Added the
Rendererinterface - Added the
StackMetadatarenderer to enable rendering thestack_*metadata
- BC BREAK:
Statisticsno longer exposes its main unit it now exposes its type using theMetricTypeenum. Timeline::dumpandTimeline::ddcan take an optional filter callable.ViewExporterno longer needs or requires theRendererwhich is removed- BC BREAK: Move all the classes related to export in their own namespace
Bakame\Stackwatch\Exporter
- None
- Removed all
Metricsstatic method related to aggregated data. useReport::metrics()instead. - Removed
Metrics::addmethod - Removed the internal
Rendererclass - BC BREAK: Remove access to
Reportproperties (they are made private to improve the public API)
0.14.0 - Nouakchott - 2025-09-05
- PHPUnit assertions helper trait
MetricsAssertionsto help profile testing using PHPUnit Framework - Added
stack,stack_watch,stack_report,stack_dump,stack_dd,stack_metrics,stack_mdumpandstack_mddto profile, dump a human-readable result into the console or the web browser using global functions to ease DX. - Added
ViewExporterandRendererto allow viewing the log in browser or in the CLI - Added
dump()anddd()methods toProfiler,Timeline,SpanAggregator,Snapshot,Metrics,Span,Report - Added
Metrics::sum,Metrics::range,Metrics::minimum,Metrics::maximun,Metrics::median,Metrics::aggregate - Adding the
AggregationTypeEnum to improveStack::metrics, theProfileAttribute and theMetricsusage. - BC BREAK:
Summaryis renamedSpan. CallLocationclass to allow recording where the packageSnapshotwas called from #8CallRangeclass to allow manipulating location range within theSummaryclass.Environment::toHumanandEnvironment::humanmethodsMetrics::yieldFromto lazily yield Metrics from other objects (Report,Timeline,Profiler,SpanandMetrics)- Added
withersmethod on theInput - Added
Input::toArgumentsto ease constructing the CLI command out of theInputinstance. - Added
Input::fromArray,Input::toArrayandInputnow implements theJsonSerializableinterface --dry-runoption tostackwatchcommand to list profiling targets without performing the profile--logoption tostackwatchcommand to specify the logfile where error logs are being stored--file-suffixto restrict files to be profiled based on their suffix.--method-visibilotyto restrict methods to be profiled based on their visibility- BC BREAK:
Visibilityis renamedDisplay - BC BREAK:
Stateis renamedFeature - BC BREAK:
Input::TABLE_FORMATis renamedInput::TEXT_FORMAT - Added a
Translatorclass to improve human-readable key translation. - Added
Profiler::dumpandProfiler::ddto profile, dump a human-readable result into the console or the web browser - Added
toHuman()method to return a human-readable version oftoArray - Added
human()method to return the human-redable version of a single property. - Added Snapshot relation method
compareToand its aliasesisBefore*isAfter*andisAtSameTimeusing theSnapshot::hrtimeproperty - BC BREAK:
Profilerclass is split into two classesStackandProfiler
UnitOfWorkinternal code improvement.- BC BREAK:
Snapshot::forHumanproperties key have been updated to remove JSON like string representation. - BC BREAK:
Snapshot::cpuproperty is replaced by 2 propertiesSnapshot::cpuUserTimeandSnapshot::cpuSystemTime. LabelGenerator::generatenow also accepts the hyphen (-) character.- Adding support for
TimelineonMetrics::sumandMetrics::averagestatic methods. - BC BREAK: Fix
ReportandEnvironmentkeys used fortoArrayandforHuman - BC BREAK: Fix
Statistics::countis notStatistics::iterationskeys used fortoArrayandforHuman - BC BREAK: Fix
Metricscalculation - BC BREAK: the
Profileattribute default to showing the full detailed metrics.
- None
- BC BREAK:
Summaryis removed and replaced bySpan. - BC BREAK:
forHuman()method is removed and replaced by 2 methodstoHuman()andhuman(). - BC BREAK: the constants attached to the
Profileattribute use theAggregateModeenum instead. - BC BREAK: Removed open telemetry exporter
0.13.0 - Marrakesh - 2025-08-14
--tagsoption to the CLI command to filter profile that needs to be run based on thetagsproperty of the #[Profile] attribute.--memory-limitoption to the CLI command to control the memroy limit of the main process.UnitSpacingEnum to control the space between value and unit when using the format related methods ofMemoryUnitandDurationUnit.VisibilityandStateEnums to improveInputoption flags properties.
- BC BREAK:
Timeline::deltadefault to creating the delta between thefromand the next snapshot before it was with the last snapshot if notolabel was given. - BC BREAK:
Inputboolean properties are replaced by discretEnum
- None
- BC BREAK:
Markerclass renamedTimeline
0.12.0 - Luanda - 2025-08-11
--depthargument and--no-recursionflag to control recursion on directories.--isolationflag to handle in isolation each file.
- BC BREAK: command line format options
tablereplace the default optioncli - BC BREAK: Changed
Bakama\Stachwatcher\Marker::summarymethod name toBakama\Stachwatcher\Marker::summarize - Internal improvement, Lazy evaluation is now done in the
UnitOfWork
- None
- None
0.11.0 - Kampala - 2025-08-03
- BC BREAK: Changed namespace from
Bakame\Aide\ProfilertoBakama\Stachwatcher StatisticsclassReportclass and theProfiler::reportmethod.ConsoleExporter::exportMetricsConsoleExporter::exportStatisticsConsoleExporter::exportReportJsonExporter- The
Stackwatchercommand to ease profiling using command line
- None
- None
- BC BREAK:
ConsoleTableExporterrenamedConsoleExporterand moved under theExporternamespace - BC BREAK:
Profiler::executionTimeremoved useProfiler::metricsinstead - BC BREAK:
Profiler::cpuTimeremoved useProfiler::metricsinstead - BC BREAK:
Profiler::memoryUsageremoved useProfiler::metricsinstead - BC BREAK:
Profiler::peakMemoryUsageremoved useProfiler::metricsinstead - BC BREAK:
Profiler::realMemoryUsageremoved useProfiler::metricsinstead - BC BREAK:
Profiler::realPeakMemoryUsageremoved useProfiler::metricsinstead - BC BREAK:
Marker::executionTimeremoved useMarker::metricsinstead - BC BREAK:
Marker::cpuTimeremoved useMarker::metricsinstead - BC BREAK:
Marker::memoryUsageremoved useMarker::metricsinstead - BC BREAK:
Marker::peakMemoryUsageremoved useMarker::metricsinstead - BC BREAK:
Marker::realMemoryUsageremoved useMarker::metricsinstead - BC BREAK:
Marker::realPeakMemoryUsageremoved useMarker::metricsinstead - BC BREAK:
ProfiledResultis renamedResult
0.10.0 - Johannesburg - 2025-07-17
Marker::completeandMarker::isCompleteProfiler::hasSummariesProfiler::filterSnapshot::fromArrayMetrics::fromArraySummary::fromArrayLabelGenerator::withLengthlabel length can be configuredMemoryUnit::convertFromandMemoryUnit::convertToDurationUnit::convertFromandDurationUnit::convertTo- The static methods from the
Profilernow can warm up before recording the metrics.
- BC BREAK:
ProfilingResult::resultis renamedProfilingResult::returnValue - BC BREAK:
ProfilingResult::ProfilingDatais renamedProfilingResult::summary - BC BREAK:
ProfilingResultis renamedProfiledResult - BC BREAK:
ProfilingDatais renamedSummary - BC BREAK:
Labelis renamedLabelGenerator - BC BREAK:
Exporter::exportProfilingDatais renamedExporter::exportSummary - BC BREAK:
Snapshot::toArrayandSnapshot::jsonSerializerepresentation simplified - BC BREAK:
Summary::toArrayandSummary::jsonSerializerepresentation simplified - BC BREAK:
Summary::__constructsignature changed - BC BREAK:
Profiler::toArrayandProfiler::jsonSerializerepresentation simplified - BC BREAK:
Marker::toArrayandMarker::jsonSerializerepresentation simplified - BC BREAK:
Marker::deltaremoved the 3rd argument - BC BREAK:
Marker::summarythrows when no summary can be generated - BC BREAK:
Marker::finishis renamedMarker::take Snapshot::cpukeys presence is validated on instantiation
- None
- None
0.9.0 - Ibadan - 2025-07-09
- Added
Metrics::forHumanto ease getting human-readable metrics representations. - Added
Snapshot::forHumanto ease getting human-readable metrics representations. - Added
EnvironmentOS Platform related methods. - Added
Markerto provide an alternative way to profile your code. - Added
Labelto decouple label generation from bothMarkerandProfiler. - Added
Exporter::exportMarkermethod to the interface. - Added
Profiler::runwithProfiler::__invokebecoming its alias - Added
Marker::identifierandProfiler::identifierto ease identify each instance uniquely
- BC BREAK:
Profiler::lastis renamedProfiler::latestto be consistent withMarker::latest - BC BREAK:
Profiler::runWithLabelis renamedProfiler::profile
- None
- None
0.8.0 - Harare - 2025-07-07
- Added
Environment::rawMemoryLimitto keep the original value if it cannot be properly parsed.
- BC BREAK:
Environment::memoryLimitis a nullable int - BC BREAK: Renamed
Metrics::statstoMetrics::toArray - BC BREAK: Renamed
Snapshot::statstoSnapshot::toArray - BC BREAK: Renamed
ProfilingData::statstoProfilingData::toArray - BC BREAK: Renamed
Environment::statstoEnvironment::toArray
- None
- None
0.7.1 - Gaborone - 2025-07-06
- None
Metrics::cpuTimecalculation
- None
- None
0.7.0 - Gaborone - 2025-07-05
Profiler::averageEnvironmentclassConsoleTableExporter::exportEnvironmentto visually show the environment settingsConsoleTableExporter::exportProfileralso provide the average as a summary
Exporter::exportProfilernow takes a second parameter to filter using the label.Metrics::average, fix bug in the calculation.
- None
- None
0.6.0 - Fezzan - 2025-07-03
DurationUnitreplacesTimeUnitEnum.- Adding
Exporter::exportSnapshotmethod.
- BC BREAK: simplify
ConsoleTableExportermemory and time unit display - BC BREAK: rewrite and simplify
MemoryUnitandDurationUnitEnum - BC BREAK:
Snapshot::executionTimeis renamedSnapshot::hrtime. - BC BREAK:
Metrics::avgis renamedMetrics::average.
- None
- BC BREAK:
TimeUnitis removed in favor ofDurationUnitEnum
0.5.0 - Enugu - 2025-07-01
- All
Profilerstatic methods can have a logger attached to them MemoryUnitandTimeUnitEnum to ease metrics values conversion.
- None
- None
- BC BREAK: renamed
CliExporterasConsoleTableExporter
0.4.0 - Durban - 2025-06-29
Metrics::avgsupportsProfilingDatainstances.Metrics::addpublic method.
- library packaging by removing development related files from downloads.
- BC BREAK: normalize duration related metrics to be expressed in nanoseconds.
- BC BREAK: normalize memory related metrics to be expressed in bytes.
- BC BREAK: Adding missing field in
Metrics::statsreturned array.
- None
- BC BREAK:
ProfilingResult::profilestatic method removed - BC BREAK:
ProfilingData::randomLabelstatic method removed
0.3.0 - Cairo - 2025-06-29
Profiler::first,Profiler::last,Profiler::nthMetricsProfilermetrics related static methods.Profiler::executestatic method.
- None
- None
- BC BREAK: The
Rendererinterface is removed - BC BREAK:
CliTableRendererrenamedCliExporter - BC BREAK:
CliTableRendererimplements theExporterinterface - BC BREAK:
Profiler::lastProfilereplaced byProfiler::last - BC BREAK:
Profiler::getreturns the lastProfilefor a specific label before it was returning the first one. - BC BREAK:
Profile::metricsreturns aMetricsobject before the metrics where attached directly to the profile. - BC BREAK: The
Metrics::executionTimeis now calculated usinghrtimeinstead ofmicrotimeand returns the value in nanoseconds - BC BREAK: The
Profileclass is now a readonly value object, the methods showing the progress of the profile generation are removed. - BC BREAK:
ProfilerenamedProfilingData - BC BREAK:
ProfileResult::valuerenamedProfileResult::result - BC BREAK:
ProfileResult::profilerenamedProfileResult::profilingData
0.2.0 - Bamako - 2025-06-27
ProfilingExceptionas the exception markerUnableToProfileandInvalidProfileStateexceptionsOpenTelemetryExporterto enable exporting theProfiler
- None
- None
- None
0.1.0 - Addis Ababa - 2025-06-26
Initial release!