v1.9.2
Summary
This release adds timing and size metrics to provide visibility into the performance characteristics of OpenAPI document loading and processing.
What's New
Timing Metrics
- Track time spent loading source documents (files, URLs, readers)
- Display total operation time for all CLI commands
- Separate load time from processing time for better analysis
Size Metrics
- Track source document size in bytes
- Human-readable size formatting (e.g., "15.2 KB", "2.3 MB")
CLI Enhancements
All commands now display relevant timing and size information:
parse command:
Source Size: 15.2 KB
Load Time: 2.5ms
validate command:
Source Size: 15.2 KB
Load Time: 2.5ms
Total Time: 45.3ms
convert command:
Source Size: 15.2 KB
Load Time: 2.5ms
Total Time: 127.8ms
join command:
Total Time: 89.2ms
diff command:
Total Time: 156.4ms
Changes
Library API
parser package:
- Added
LoadTime time.Durationfield toParseResult - Added
SourceSize int64field toParseResult - Added
FormatBytes(int64) stringfunction for human-readable size formatting
validator package:
- Added
LoadTimeandSourceSizefields toValidationResult
converter package:
- Added
LoadTimeandSourceSizefields toConversionResult
Technical Details
- Load time captures file I/O, URL fetching, or reader operations
- Total time includes parsing, validation/conversion/joining, and output
- Size is measured in bytes of raw source data
- Timing uses
time.Durationfor precision - Format helper uses 1024-based units (KiB, MiB, etc.)
Installation
Homebrew
brew tap erraggy/oastools
brew upgrade oastoolsBinary Download
Download the appropriate binary for your platform from the assets below.
Related PRs
- #24 - feat: add timing and size metrics to parse results
Notes
- All changes are backward compatible
- No breaking changes to public API
- New fields are additive only