Skip to content

feat: add update check, machine-readable output formats, and latency metrics#18

Merged
e7d merged 1 commit intomainfrom
feat/main/enhanced-output
Jan 11, 2026
Merged

feat: add update check, machine-readable output formats, and latency metrics#18
e7d merged 1 commit intomainfrom
feat/main/enhanced-output

Conversation

@e7d
Copy link
Copy Markdown
Collaborator

@e7d e7d commented Jan 11, 2026

This PR introduces several enhancements to improve user experience, automation capabilities, and benchmark insights.

🆕 New Features

Update Check (UPDATE_CHECK)

  • Notifies users when a newer version of diskmark is available
  • Compares current version against latest GitHub release at startup
  • Controlled via UPDATE_CHECK=0|1 (default: 1)
  • Automatically disabled when using machine-readable output formats

Machine-Readable Output (FORMAT)

  • New FORMAT environment variable supports json, yaml, and xml output
  • Structured output with configuration and results objects
  • Enables easy integration with CI/CD pipelines and monitoring tools
  • Automatically disables colors, emojis, and update check for clean output

Latency Metrics

  • Adds average latency (in milliseconds) to each benchmark result
  • Displays as X.XXms in human-readable output
  • Included as latency_ms field in structured outputs
  • Uses fio's clat_ns.mean (completion latency) for accurate measurement

Version Injection

  • Docker build now injects version from Git tag into /etc/diskmark-version
  • Enables accurate version display and update checking

🔧 Improvements

CI/CD

  • Added GitHub badges to README (tag, CodeQL, Tests, Docker Image)
  • Test workflow now uses continue-on-error: true pattern for per-step failure visibility
  • Added comprehensive tests for UPDATE_CHECK and FORMAT validation
  • Benchmark tests automatically disable update check for cleaner output

Dockerfile

  • Added wget and ssl_client binaries for HTTPS update checking
  • Renamed staging directory from /dist to /diskmark for clarity
  • Added version file injection via build arg

📖 Documentation

  • Updated parameter table with UPDATE_CHECK and FORMAT options
  • Added "Machine-readable output" section with usage examples
  • Added sample outputs for JSON, YAML, and XML formats (with latency)

📊 Sample Output

Human-readable:

Sequential 1M Q8T1:
<= Read:  524 MB/s, 499 IO/s, 2.15ms
=> Write: 498 MB/s, 475 IO/s, 1.89ms

JSON:

{
  "configuration": { ... },
  "results": [
    {"name": "SEQ1MQ8T1", "status": "success", 
     "read": {"bandwidth_mb": 524, "iops": 499, "latency_ms": 2.15},
     "write": {"bandwidth_mb": 498, "iops": 475, "latency_ms": 1.89}}
  ]
}

✅ Testing

  • All existing tests pass
  • New validation tests for UPDATE_CHECK (valid/invalid values)
  • New validation tests for FORMAT (valid/invalid values)
  • FORMAT output validation tests (JSON/YAML/XML validity and structure)
  • Image size unchanged (~36MB)

🔄 Breaking Changes

None. All new features are opt-in or backward compatible.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 11, 2026

🔍 Vulnerabilities of ghcr.io/e7db/diskmark:pr-18

📦 Image Reference ghcr.io/e7db/diskmark:pr-18
digestsha256:4e78b33cfe7c019145ac3a1c7f751e26a5a5ed1122abf27a747fad48b2d8a8a3
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
platformlinux/amd64
size17 MB
packages1

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 11, 2026

Overview

Image reference ghcr.io/e7db/diskmark:latest ghcr.io/e7db/diskmark:pr-18
- digest bd5f55d988bf 4e78b33cfe7c
- tag latest pr-18
- provenance dab544d 36c6780
- vulnerabilities critical: 0 high: 0 medium: 0 low: 0 critical: 0 high: 0 medium: 0 low: 0
- platform linux/amd64 linux/amd64
- size 16 MB 17 MB (+516 kB)
- packages 1 1
Labels (2 changes)
  • ± 2 changed
  • 6 unchanged
-org.opencontainers.image.created=2026-01-10T12:32:02.121Z
+org.opencontainers.image.created=2026-01-11T11:20:19.894Z
 org.opencontainers.image.description=A disk benchmarking tool for Docker
 org.opencontainers.image.licenses=Apache-2.0
 org.opencontainers.image.revision=
 org.opencontainers.image.source=https://github.com/e7db/docker-diskmark
 org.opencontainers.image.title=docker-diskmark
 org.opencontainers.image.url=https://github.com/e7db/docker-diskmark
-org.opencontainers.image.version=1.1.0
+org.opencontainers.image.version=pr-18

@e7d e7d force-pushed the feat/main/enhanced-output branch 5 times, most recently from e735a56 to 5819860 Compare January 11, 2026 11:20
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 11, 2026

🔍 Vulnerabilities of ghcr.io/e7db/diskmark:pr-18

📦 Image Reference ghcr.io/e7db/diskmark:pr-18
digestsha256:b514141e9673e3c2a5418d4796a63b5e6b1b37277b6476e2d792d1a21669f6d2
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
platformlinux/amd64
size17 MB
packages1

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 11, 2026

Overview

Image reference ghcr.io/e7db/diskmark:latest ghcr.io/e7db/diskmark:pr-18
- digest bd5f55d988bf b514141e9673
- tag latest pr-18
- provenance dab544d f8b672c
- vulnerabilities critical: 0 high: 0 medium: 0 low: 0 critical: 0 high: 0 medium: 0 low: 0
- platform linux/amd64 linux/amd64
- size 16 MB 17 MB (+516 kB)
- packages 1 1
Labels (2 changes)
  • ± 2 changed
  • 6 unchanged
-org.opencontainers.image.created=2026-01-10T12:32:02.121Z
+org.opencontainers.image.created=2026-01-11T11:47:02.777Z
 org.opencontainers.image.description=A disk benchmarking tool for Docker
 org.opencontainers.image.licenses=Apache-2.0
 org.opencontainers.image.revision=
 org.opencontainers.image.source=https://github.com/e7db/docker-diskmark
 org.opencontainers.image.title=docker-diskmark
 org.opencontainers.image.url=https://github.com/e7db/docker-diskmark
-org.opencontainers.image.version=1.1.0
+org.opencontainers.image.version=pr-18

@e7d e7d force-pushed the feat/main/enhanced-output branch from 5819860 to 9bc1151 Compare January 11, 2026 11:22
…metrics

- Add UPDATE_CHECK option to notify users of new versions at startup
- Add FORMAT option for machine-readable output (json, yaml, xml)
- Add latency metrics (avg ms) to benchmark results
- Add version injection via Docker build arg
- Add GitHub badges for tag, CodeQL, Tests, Docker Image workflows
- Improve test workflow with continue-on-error for per-step visibility
- Add tests for UPDATE_CHECK and FORMAT validation
- Update README with new options and sample outputs
@e7d e7d force-pushed the feat/main/enhanced-output branch from 9bc1151 to d013a4a Compare January 11, 2026 11:46
@e7d e7d merged commit f8ed615 into main Jan 11, 2026
5 checks passed
@e7d e7d deleted the feat/main/enhanced-output branch January 11, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant