Skip to main content

Profile Command

The profile command is a dedicated diagnostic CLI tool designed to provide extreme, sub-millisecond precision for diagnosing network latency at the socket level.

While rumour run --profile gives you a high-level breakdown of Processing (TTFB) vs Transfer time, rumour profile dives much deeper. It uses the system's cURL backend to capture microsecond-level metrics for DNS resolution, TCP handshakes, and TLS negotiation.

This command is invaluable when an API is inexplicably slow and you need to determine if the issue is DNS routing, a slow TLS handshake, or the backend database itself.

Basic Usage

You can pass either a direct URL or a .toml request file to the profile command:

rumour profile <URL_OR_PATH>
  • <URL_OR_PATH> — The direct URL (e.g. https://api.example.com) or the path to a .toml request file you want to profile.

[!NOTE] If you provide a .toml file, Rumour will automatically extract the request.url from it. It will also intelligently traverse upwards through your directories to find workspace.env.toml to dynamically resolve environment variables like {{base_url}}.

Examples

Profiling a Request File

rumour profile ./assertion_examples/perf_demo.toml

Output:

Performance Profile: ./assertion_examples/perf_demo.toml

Request: http://localhost:3000/api/v2/users/1
Status: 200

Timing Breakdown:
╭--------------------+------+------------╮
| Phase | Time | Percentage |
+========================================+
| DNS Lookup | 0ms | 1.0% |
|--------------------+------+------------|
| TCP Connect | 0ms | 8.9% |
|--------------------+------+------------|
| TLS Handshake | 0ms | 0.0% |
|--------------------+------+------------|
| Time to First Byte | 3ms | 88.7% |
|--------------------+------+------------|
| Content Download | 0ms | 1.4% |
|--------------------+------+------------|
| TOTAL | 3ms | 100% |
╰--------------------+------+------------╯

Transfer:
Request Size: 92 B
Response Size: 1.6 KB

Interpreting the Bottlenecks

Use the profiling table to pinpoint the exact network layer causing the slowdown:

SymptomLikely CausePotential Solution
High DNS LookupSlow local DNS resolverUse a faster DNS server (e.g., 1.1.1.1) or use direct IP addresses.
High TCP ConnectGeographic distance or routingUse a CDN or deploy your test runner closer to the staging environment.
High TLS HandshakeSlow encryption negotiationUpgrade to TLS 1.3 or enable session resumption on your load balancer.
High TTFBSlow backend or database queryThis is "Server Processing Time". Optimize server-side code, add indexing, or implement caching.
High Content DownloadExtremely large payloadEnable server compression (gzip, br) or implement pagination on the endpoint.