Skip to content

Commit

Permalink
simplify option names and logic for v3
Browse files Browse the repository at this point in the history
  • Loading branch information
josephcopenhaver committed Nov 12, 2023
1 parent a109149 commit e552bea
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 45 deletions.
44 changes: 22 additions & 22 deletions docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ The output CSV file has the following metric possibilities:
| min_task_latency | Duration String | The smallest duration a task spent in the execution phase for tasks completed in the sample interval. |
| avg_task_latency | Duration String | The average duration a task spent in the execution phase for tasks completed in the sample interval. |
| max_task_latency | Duration String | The largest duration a task spent in the execution phase for tasks completed in the sample interval. |
| p25_queue_latency | RFC3339Nano Time String \| empty string | 25% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p50_queue_latency | RFC3339Nano Time String \| empty string | 50% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p75_queue_latency | RFC3339Nano Time String \| empty string | 75% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p80_queue_latency | RFC3339Nano Time String \| empty string | 80% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p85_queue_latency | RFC3339Nano Time String \| empty string | 85% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p90_queue_latency | RFC3339Nano Time String \| empty string | 90% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p95_queue_latency | RFC3339Nano Time String \| empty string | 95% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p99_queue_latency | RFC3339Nano Time String \| empty string | 99% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p99p9_queue_latency | RFC3339Nano Time String \| empty string | 99.90% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p99p99_queue_latency | RFC3339Nano Time String \| empty string | 99.99% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p25_task_latency | RFC3339Nano Time String \| empty string | 25% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p50_task_latency | RFC3339Nano Time String \| empty string | 50% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p75_task_latency | RFC3339Nano Time String \| empty string | 75% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p80_task_latency | RFC3339Nano Time String \| empty string | 80% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p85_task_latency | RFC3339Nano Time String \| empty string | 85% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p90_task_latency | RFC3339Nano Time String \| empty string | 90% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p95_task_latency | RFC3339Nano Time String \| empty string | 95% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p99_task_latency | RFC3339Nano Time String \| empty string | 99% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p99p9_task_latency | RFC3339Nano Time String \| empty string | 99.90% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| p99p99_task_latency | RFC3339Nano Time String \| empty string | 99.99% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentilesEnabled() option is set to true ( default value: false) |
| queue_latency_variance | Duration String \| empty string | The welford variance value computed for the queue phase of tasks completed in the sample interval. Always output in nanoseconds. Will be set to an empty string if the sample size for the interval is less than two. Only present in output file when the MetricsLatencyVariancesEnabled() option is set to true ( default value: false) |
| task_latency_variance | Duration String \| empty string | The welford variance value computed for the execution phase of tasks completed in the sample interval. Always output in nanoseconds. Will be set to an empty string if the sample size for the interval is less than two. Only present in output file when the MetricsLatencyVariancesEnabled() option is set to true ( default value: false) |
| p25_queue_latency | RFC3339Nano Time String \| empty string | 25% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p50_queue_latency | RFC3339Nano Time String \| empty string | 50% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p75_queue_latency | RFC3339Nano Time String \| empty string | 75% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p80_queue_latency | RFC3339Nano Time String \| empty string | 80% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p85_queue_latency | RFC3339Nano Time String \| empty string | 85% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p90_queue_latency | RFC3339Nano Time String \| empty string | 90% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p95_queue_latency | RFC3339Nano Time String \| empty string | 95% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p99_queue_latency | RFC3339Nano Time String \| empty string | 99% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p99p9_queue_latency | RFC3339Nano Time String \| empty string | 99.90% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p99p99_queue_latency | RFC3339Nano Time String \| empty string | 99.99% of all metric records in the sample interval have a queue phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p25_task_latency | RFC3339Nano Time String \| empty string | 25% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p50_task_latency | RFC3339Nano Time String \| empty string | 50% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p75_task_latency | RFC3339Nano Time String \| empty string | 75% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p80_task_latency | RFC3339Nano Time String \| empty string | 80% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p85_task_latency | RFC3339Nano Time String \| empty string | 85% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p90_task_latency | RFC3339Nano Time String \| empty string | 90% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p95_task_latency | RFC3339Nano Time String \| empty string | 95% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p99_task_latency | RFC3339Nano Time String \| empty string | 99% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p99p9_task_latency | RFC3339Nano Time String \| empty string | 99.90% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| p99p99_task_latency | RFC3339Nano Time String \| empty string | 99.99% of all metric records in the sample interval have an execution phase latency at or under this value. It will be an empty string if there are no records in the sample interval. Only present in output file when the MetricsLatencyPercentile() option is set to true ( default value: false) |
| queue_latency_variance | Duration String \| empty string | The welford variance value computed for the queue phase of tasks completed in the sample interval. Always output in nanoseconds. Will be set to an empty string if the sample size for the interval is less than two. Only present in output file when the MetricsLatencyVariance() option is set to true ( default value: false) |
| task_latency_variance | Duration String \| empty string | The welford variance value computed for the execution phase of tasks completed in the sample interval. Always output in nanoseconds. Will be set to an empty string if the sample size for the interval is less than two. Only present in output file when the MetricsLatencyVariance() option is set to true ( default value: false) |
| percent_done | Double | A numeric value with precision to the second decimal place ranging from 0 to 100. Only present in output file when the MaxTasks() option is set to a value greater than zero ( default value: 0) |

# changelog
Expand Down
3 changes: 2 additions & 1 deletion loadtester/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ func main() {
op.NumIntervalTasks(25),
op.Interval(1*time.Second),
op.Retry(false), // default is true; not required for this example since no tasks can be retried, plus saves some minor compute and disk io
// op.MetricsLatencyPercentilesEnabled(true), // default is false
// op.MetricsLatencyPercentile(true), // default is false
// op.MetricsLatencyVarianceEnabled(true), // default is false
// op.FlushRetriesOnShutdown(true), // default is false
// op.MetricsCsv(false) // default is true; set to false to stop creating a metrics.csv file on loadtest run
)
if err != nil {
panic(err)
Expand Down
3 changes: 2 additions & 1 deletion loadtester/example_http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ func main() {
op.NumIntervalTasks(parallelism),
op.Interval(5*time.Second),
op.Retry(false), // default is true; not required for this example since no tasks can be retried, plus saves some minor compute and disk io
// op.MetricsLatencyPercentilesEnabled(true), // default is false
// op.MetricsLatencyPercentile(true), // default is false
// op.MetricsLatencyVarianceEnabled(true), // default is false
// op.FlushRetriesOnShutdown(true), // default is false
// op.MetricsCsv(false) // default is true; set to false to stop creating a metrics.csv file on loadtest run
)
if err != nil {
panic(err)
Expand Down
8 changes: 4 additions & 4 deletions loadtester/gen_strategies.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion loadtester/internal/cmd/generate/run.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ func (lt *Loadtest) run_retries{{if .RetriesEnabled}}Enabled{{else}}Disabled{{en
lt.startTime = time.Now()

{{if .MetricsEnabled}}
// if lt.csvData.writeErr == nil // a.k.a. !cfg.csvOutputDisabled // (a.k.a. metrics enabled)
// if lt.csvData.writeErr == nil // a.k.a. cfg.csvOutputEnabled // (a.k.a. metrics enabled)
{

csvFile, err := os.Create(lt.csvData.outputFilename)
Expand Down
Loading

0 comments on commit e552bea

Please sign in to comment.