Skip to content

Main content

Monotone Counter Rate Unit Factor Tool

Rescale a non-reset monotone counter increment to caller-supplied target time units.

Loading tool…

Description

Divide their difference by elapsedSourceTime × suppliedTargetTimesPerSourceTime, both positive.

A cumulative counter can increase, wrap, or restart. The difference between two readings is meaningful only under an explicit rollover or reset model and compatible time units.

Divide their difference by elapsedSourceTime × suppliedTargetTimesPerSourceTime, both positive.

When to use this tool

Use Monotone Counter Rate Unit Factor when you need a supplied counter difference or rate convention.

How to use the tool and how it works

  1. Enter counterStart, counterEnd, elapsedSourceTime, suppliedTargetTimesPerSourceTime. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read ratePerTargetTime. Use the output convention below.

Require counterEnd ≥ counterStart. Divide their difference by elapsedSourceTime × suppliedTargetTimesPerSourceTime, both positive.1

Input fieldMeaning and unitsAccepted input
counterStartCounter StartRequired. Finite number.
counterEndCounter EndRequired. Finite number.
elapsedSourceTimeElapsed Source TimeRequired. Finite number; strictly above 0.
suppliedTargetTimesPerSourceTimeSupplied Target Times Per Source TimeRequired. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
ratePerTargetTimeRate Per Target TimeRequired. Finite number.
json
{
  "input": {
    "counterStart": 100,
    "counterEnd": 160,
    "elapsedSourceTime": 2,
    "suppliedTargetTimesPerSourceTime": 60
  },
  "output": {
    "ratePerTargetTime": 0.5
  }
}

Limitations and assumptions

  • The time factor belongs in the duration denominator; resets, wraps, and unit selection must be resolved externally.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use reset events, wrap epochs, and monotonic timestamps to resolve ambiguous counter histories.

References

  1. Calculation and input contract: metrics/monotone-counter-rate-unit-factor — tool.io

Similar or alternative tools