Skip to content
Astera Technology

Define the interval measured by a response target

Keep server execution separate from the complete user wait.

Download complete case notes and answer keys ↓

Set the decision and its input

The supplied trace has network2 seconds, server3 and client render4. A server-only measure is3; the user-complete interval is9. The base requirement asks for user completion, so a server-only result cannot satisfy its measurement contract.

Filled local test worksheet
CaseInput JSON
Base test{"scope":"user-complete","seconds":{"network":2,"server":3,"render":4}}
Download editable CSV ↓

Run the supplied comparison

The programme sums only the named observed phases for the requested scope. It does not infer an unknown phase or certify that a real system’s instrumentation captures every possible delay.

Faulty and required outputs
PathOutput JSON
Faulty path{"scope":"user-complete","measuredSeconds":3}
Required path{"scope":"user-complete","measuredSeconds":9}
Download editable CSV ↓
Complete local Node24.14.1 programme
import assert from 'node:assert/strict';

const run=function run(i,corrected=true){
    if(!['server','user-complete'].includes(i.scope)||['network','server','render'].some(k=>!Number.isFinite(i.seconds[k])||i.seconds[k]<0))return {held:true};
    const total=i.seconds.network+i.seconds.server+i.seconds.render;
    return {scope:i.scope,measuredSeconds:corrected&&i.scope==='user-complete'?total:i.seconds.server};
  };
const cases=[{"input":{"scope":"user-complete","seconds":{"network":2,"server":3,"render":4}},"corrected":false,"expected":{"scope":"user-complete","measuredSeconds":3}},{"input":{"scope":"user-complete","seconds":{"network":2,"server":3,"render":4}},"corrected":true,"expected":{"scope":"user-complete","measuredSeconds":9}},{"input":{"scope":"server","seconds":{"network":2,"server":3,"render":4}},"corrected":true,"expected":{"scope":"server","measuredSeconds":3}},{"input":{"scope":"user-complete","seconds":{"network":2,"server":3,"render":null}},"corrected":true,"expected":{"held":true}}];
for(const test of cases){const actual=await run(test.input,test.corrected);assert.deepEqual(actual,test.expected);console.log(actual);}
Download runnable example ↓

Choose from the boundary evidence

Explicit server scope legitimately gives3. Missing render duration makes the full comparison held rather than9 guessed from another trace.

  1. Name the interval endpoints
  2. Collect each included phase
  3. Report the scoped duration

Hold an unobserved required phase instead of treating it as zero.

Editable boundary inputs and outputs
ConditionInput JSONExpected output JSON
server-only target{"scope":"server","seconds":{"network":2,"server":3,"render":4}}{"scope":"server","measuredSeconds":3}
render interval unobserved{"scope":"user-complete","seconds":{"network":2,"server":3,"render":null}}{"held":true}
Download editable CSV ↓

What duration belongs to the base user-complete target?

Show the worked answer

Nine seconds:2+3+4. Three seconds describes only the server phase and must retain that narrower label.

Related resources