---
title: "autocos"
description: "Repeatable benchmark lifecycle automation over cosbench-rs, Swift, Java COSBench, or mock backends."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.myswift.rs/llms.txt
> Use this file to discover all available pages before exploring further.

# autocos

`autocos` converts a task name such as `64KB_write_100` into workload
generation, execution, progress tracking, result retention, and CSV/XLSX
reporting. Its state is isolated under `~/.autocos/` (`config`, `result`,
`fool`, and `lib`).

## Install

```sh
cd autocos
cargo build --release --locked
install -m 0755 target/release/autocos /usr/local/bin/autocos
autocos --help
```

## Task names and suites

A single task is `<size>_<read|write>_<workers>`, for example
`4KB_read_128` or `16MB_write_8`. `fool` is the built-in size × operation ×
concurrency suite. Override counts and runtime explicitly so the report can be
reproduced.

```sh
autocos run 64KB_write_64 \
  --prepare-worker 16 \
  --object-count 400 \
  --container-count 4 \
  --runtime 25
autocos run fool --start-task 1MB_read_32
autocos run fool --rerun-task 16MB_write_8
```

## Backends

| Backend | Credentials or controller | Notes |
|---|---|---|
| `cosbench-rs` | S3 env/`~/.s3cfg`, or Swift env | default; selects Swift when `ST_AUTH` is present |
| `swift` | `ST_AUTH`, `ST_USER`, `ST_KEY` | direct TempAuth path |
| `java` | `--cosbench-url` | Java COSBench controller |
| `mock` | none | driver and reporting checks only |

Swift example:

```sh
export ST_AUTH=http://127.0.0.1:8080/auth/v1.0
export ST_USER=test:tester
export ST_KEY='REPLACE_FROM_SECRET_STORE'
autocos run 64KB_read_32 --backend swift --runtime 30
```

The current loader does not implement `ST_ENDPOINT`. The backend follows the
storage URL returned by TempAuth. If a benchmark contract needs a fixed route,
configure that route in the underlying cosbench-rs workload or the auth/LB
environment and record it in the run manifest.

S3 uses `accesskey`, `secretkey`, and `endpoint` (uppercase spellings are also
accepted), or `access_key`, `secret_key`, and `host_base` from `~/.s3cfg`.

## Result lifecycle

| Command | Behavior |
|---|---|
| `list [fool]` | list completed normal or suite runs |
| `remove <wid>` | remove a normal result |
| `remove -f <wid>` | remove one result from the suite namespace |
| `collect [--out PATH]` | build the normal CSV report |
| `run fool --collect` | collect the suite without rerunning it |

Collection emits a CSV and the suite/report path can generate a formatted XLSX
with throughput, bandwidth, and latency charts. Keep raw per-run results with
the report; a spreadsheet alone loses provenance and error samples.

## Production-grade use

Benchmark only a named route and immutable binary set. Record object size,
workers, duration/op count, prepare population, cleanup outcome, client host,
network path, CPU/memory limits, background traffic, rings/policies, and all
error/latency distributions. A historical zero-failure run is not acceptance
of the current candidate; see [Performance](/performance) and
[G0-G8 validation](/validation-gates).

Source: https://docs.myswift.rs/autocos/index.mdx
