source: rtems-central/spec/rtems/barrier/req/perf-release-auto-other-cpu.yml @ 58afe54

Last change on this file since 58afe54 was 58afe54, checked in by Sebastian Huber <sebastian.huber@…>, on 11/25/21 at 12:55:40

spec: Add performance requirements

  • Property mode set to 100644
File size: 2.3 KB
Line 
1SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
2copyrights:
3- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
4enabled-by: RTEMS_SMP
5limits: {}
6links:
7- role: requirement-refinement
8  uid: perf-runtime
9- role: runtime-measurement-request
10  uid: ../val/perf
11non-functional-type: performance-runtime
12params: {}
13rationale: null
14references: []
15requirement-type: non-functional
16test-body:
17  brief: |
18    Automatically release the barrier.
19  code: |
20    ctx->begin = T_tick();
21    ctx->status = rtems_barrier_wait( ctx->barrier_id, RTEMS_NO_TIMEOUT );
22  description: null
23test-cleanup:
24  brief: |
25    Delete the barrier and the worker.
26  code: |
27    rtems_status_code sc;
28
29    DeleteTask( ctx->worker_id );
30
31    sc = rtems_barrier_delete( ctx->barrier_id );
32    T_rsc_success( sc );
33  description: null
34test-prepare:
35  brief: |
36    Create an automatic release barrier.  Create and start a worker task.
37  code: |
38    rtems_status_code sc;
39
40    sc = rtems_barrier_create(
41      OBJECT_NAME,
42      RTEMS_BARRIER_AUTOMATIC_RELEASE,
43      2,
44      &ctx->barrier_id
45    );
46    T_rsc_success( sc );
47
48    ctx->worker_id = CreateTask( "WORK", PRIO_NORMAL );
49    SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
50    StartTask( ctx->worker_id, BarrierWaitWorker, ctx );
51    WaitForNextTask( 1, ctx->worker_id );
52  description: null
53test-setup: null
54test-teardown:
55  brief: |
56    Make sure the worker waits for the next event.  Set the measured runtime.
57    Discard samples interrupted by a clock tick.
58  code: |
59    T_quiet_rsc_success( ctx->status );
60
61    WaitForNextTask( 1, ctx->worker_id );
62    *delta = ctx->end - ctx->begin;
63
64    return tic == toc;
65  description: null
66text: |
67  Let ``U` and `V`` be two tasks with distinct home schedulers.  Let :math:`B`
68  be a time point measured by ``U`` right before a call to ${../if/wait:/name}
69  which automaticall releases the barrier.  Let :math:`E` be a time point
70  measured by ``V`` right after a call to ${../if/wait:/name} returns
71  successfully due to the ${../if/wait:/name} call associated with :math:`B`.
72  While the execution environment is ${.:/environment}, while the barrier is an
73  automatic release barrier, while the measurement sample is :math:`E - B`,
74  when exactly ${../val/perf:/params/sample-count} samples are collected, the
75  ${.:/limit-kind} shall be ${.:/limit-condition}.
76type: requirement
Note: See TracBrowser for help on using the repository browser.