tar-performance-cli
v0.0.2
Published
a CLI tool for publishing performance test results.
Maintainers
Readme
tar-performance-cli
tar-performance-cli is a CLI tool for collecting and packaging performance test results in Azure DevOps pipelines.
It recursively searches a directory for structured log files, converts them to JSON, backs them up with mirrored directory structure, and publishes the results as an Azure DevOps artifact.
Features
- Recursively collect performance log files from a given directory
- Convert structured log files to nested JSON (generic parser, not tied to any specific product)
- Back up original log files with mirrored directory structure
- Stop packaging when no matching log file is found, with clear warning logs
- Generate pipeline and environment metadata automatically (gracefully degrades to
Unknownwhen running locally) - Support for optional JUnit XML reports alongside performance logs
- Support for custom key-value pairs and extra JSON metadata
- Easy integration with Azure DevOps CI/CD pipelines
Output Structure
Each run produces a timestamped directory (e.g. tar_20260225_0954_862917) in the system temp folder:
tar_20260225_0954_862917/
├── info.json # Pipeline and environment metadata
├── performance # Marker file with content "1" (generated on successful package creation)
├── result/ # Converted JSON files (with unique 3-char prefix)
│ └── a3x-ScriptOutputMessage.json
├── result.zip # Compressed result directory
└── logs/ # Original log files with mirrored directory structure
└── main-dir/
└── com/example/test/
└── ScriptOutputMessage.logInstallation
Global Installation (Recommended)
npm install -g tar-performance-cliUsing npx (No Installation Required)
npx tar-performance-cli --helpUsage
After Global Installation
tar-performance-cli --dir <path> --reportFileName <filename> --testSuiteName <suite> [options]Using npx
npx tar-performance-cli --dir <path> --reportFileName <filename> --testSuiteName <suite> [options]Examples
# Collect all ScriptOutputMessage.log files under a directory
tar-performance-cli --dir ./results --reportFileName ScriptOutputMessage.log --testSuiteName "Performance Tests"
# With test environment and additional metadata
tar-performance-cli \
--dir ./results \
--reportFileName ScriptOutputMessage.log \
--testSuiteName "Nightly Performance Test" \
--testEnvironment qa \
--keyValuePairs "product=MyProduct|version=2026.1"
# Also include JUnit XML reports alongside performance logs
tar-performance-cli \
--dir ./results \
--reportFileName ScriptOutputMessage.log \
--testSuiteName "Full Suite" \
--junitXmlFiles junit-result.xmlOptions
| Option | Alias | Description | Required |
|----------------------|-------|--------------------------------------------------------|----------|
| --dir | -d | Root directory to recursively search for log files | Yes |
| --reportFileName | -n | Name of the log file to search for | Yes |
| --testSuiteName | -t | Test suite or stage name | Yes |
| --junitXmlFiles | -f | Comma-separated JUnit XML file paths | No |
| --testEnvironment | -e | Test environment (dev, qa, sit, prod, etc.) | No |
| --atlassianDomain | -s | Atlassian domain name (for Xray link) | No |
| --url | -r | URL under test | No |
| --productBuildBranch | -pb | Product build branch | No |
| --projectName | -p | Project name | No |
| --extJson | -x | Path to extra flat JSON file (1-to-1 key-value pairs) | No |
| --artifactJson | -j | Path to artifact JSON file | No |
| --artifactDir | -c | Path to artifact directory | No |
| --keyValuePairs | -k | Extra key-value pairs (e.g. key=value\|key=value) | No |
Log File Format
The tool parses structured log files with section headers and key-value pairs, for example:
File: /path/to/script.py
Output:
SECTION NAME
===============================================================================
Field Name : value
Another Field : another value- Section headers and field names are converted to camelCase in the output JSON
- All values are stored as strings
- The parser is generic and not tied to any specific product or section names
Behavior Notes
- If no file matching
--reportFileNameis found under--dir, the CLI stops immediately and does not generate a tar output directory. - On successful package creation, the CLI writes a
performancetext file (content:1) in the output root directory to mark artifacts generated bytar-performance-cli.
License
Copyright (c) 2026 reedx. All rights reserved.
This software is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited.
