Skip to content

Detector catalog / Speed

TINY

Tiny tasks

Very short tasks spend more time being scheduled than running.

Outcome
Speed
Scope
Judged per stage
Usual fix
A change in the job code
CI gate
No budget flag: gate it with --fail-on-introduced against a baseline

An example finding

Where you see it

Dashboard

The TINY tag marks it in the action region of the dashboard, among the widgets that rank a fix. Every affected stage is flagged, not only the worst.How to read it in the findings guide.

Agent (MCP)

An assistant can read this entry with the list_detectors tool and its background with get_finding_documentation. The call and the response below come from a real run of the MCP server.

Call

{
  "tool": "list_detectors",
  "arguments": {
    "type": "tinyTask"
  }
}

Response

{
  "count": 1,
  "detectors": [
    {
      "type": "tinyTask",
      "name": "tiny tasks",
      "tag": "TINY",
      "tagSharedWith": [],
      "family": "speed",
      "pitch": "Very short tasks spend more time being scheduled than running.",
      "region": "action",
      "scope": "stage",
      "fixEffort": "code",
      "thresholdSummary": "100+ tasks with a median of 500ms or less and a P95 of 1000ms or less",
      "detectors": [
        {
          "detector": "tinyTask",
          "version": 1,
          "thresholds": {
            "minTasks": 100,
            "maxP50": 500,
            "maxP95": 1000,
            "stageFloorPct": 0.005
          }
        }
      ],
      "pages": {
        "catalog": "docs/detectors/tinyTask.html",
        "guide": "docs/user-guide/understanding-findings.html#tiny"
      },
      "tuning": {
        "kind": "page",
        "anchor": "#bottleneck-tiny-tasks",
        "path": "docs/tuning-reference/bottleneck-tiny-tasks.html#bottleneck-tiny-tasks"
      },
      "gate": null
    }
  ]
}

get_finding_documentation call

{
  "tool": "get_finding_documentation",
  "arguments": {
    "type": "tinyTask"
  }
}

Its response, with each Markdown body replaced by its length

{
  "type": "tinyTask",
  "name": "Tiny Tasks",
  "detectionDoc": {
    "tag": "TINY",
    "title": "Tiny tasks",
    "content": "<784 characters of Markdown>"
  },
  "tuningDoc": {
    "anchor": "#bottleneck-tiny-tasks",
    "title": "Tiny Tasks",
    "content": "<5423 characters of Markdown>"
  }
}

CI (CLI)

List this entry from the command line. The output below is a real run of the command. Budgets and exit codes are in the CI guide.

sparkforensics-analyze detectors --type tinyTask --format md
# Detectors (1)

## Speed

| Tag | Type | Scope | Fix | Gate | What it finds |
| --- | --- | --- | --- | --- | --- |
| TINY | `tinyTask` | stage | code |  | Very short tasks spend more time being scheduled than running. |

Report only this finding type for a run with --type:

sparkforensics-analyze <event-log> --type tinyTask --impact critical,warning,info

It has no budget flag. Fail a build on a new one by comparing against a baseline with --fail-on-introduced.

Airflow

The operator has no budget parameter for it. Use fail_on_introduced with a baseline.

check_spark_job = SparkForensicsOperator(
    task_id="check_spark_job",
    log_source=...,
    backend=SubprocessAnalyzeHook(),
    baseline_log_source=...,
    fail_on_introduced="critical",
)

The operator works per run, and its summary counts findings per impact band. See the operator for its parameters.

How it is measured

Thresholds

100+ tasks with a median of 500ms or less and a P95 of 1000ms or less.

tinyTask version 1

ThresholdDefault
minTasks100
maxP50500
maxP951000
stageFloorPct0.005

Each rule's impact bands and fixed fallbacks are in the threshold tables.

Override a default per run with --thresholds; see Tuning detector thresholds.

Docs