Skip to content

v1.9.2

Choose a tag to compare

@erraggy erraggy released this 21 Nov 04:45
· 318 commits to main since this release
5c270dc

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.Duration field to ParseResult
  • Added SourceSize int64 field to ParseResult
  • Added FormatBytes(int64) string function for human-readable size formatting

validator package:

  • Added LoadTime and SourceSize fields to ValidationResult

converter package:

  • Added LoadTime and SourceSize fields to ConversionResult

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.Duration for precision
  • Format helper uses 1024-based units (KiB, MiB, etc.)

Installation

Homebrew

brew tap erraggy/oastools
brew upgrade oastools

Binary 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