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

Last change on this file since 79cc481 was 79cc481, checked in by Sebastian Huber <sebastian.huber@…>, on 11/24/21 at 14:33:17

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  description: null
52test-setup:
53  brief: |
54    Make sure the worker task is fully blocked on the barrier.
55  code: |
56    WaitForNextTask( 1, ctx->worker_id );
57  description: null
58test-teardown:
59  brief: |
60    Set the measured runtime.  Discard samples interrupted by a clock tick.
61  code: |
62    T_quiet_rsc_success( ctx->status );
63
64    *delta = ctx->end - ctx->begin;
65
66    return tic == toc;
67  description: null
68text: |
69  Let ``U` and `V`` be two tasks with distinct home schedulers.  Let :math:`B`
70  be a time point measured by ``U`` right before a call to ${../if/wait:/name}
71  which automaticall releases the barrier.  Let :math:`E` be a time point
72  measured by ``V`` right after a call to ${../if/wait:/name} returns
73  successfully due to the ${../if/wait:/name} call associated with :math:`B`.
74  While the execution environment is ${.:/environment}, while the barrier is an
75  automatic release barrier, while the measurement sample is :math:`E - B`,
76  when exactly ${../val/perf:/params/sample-count} samples are collected, the
77  ${.:/limit-kind} shall be ${.:/limit-condition}.
78type: requirement
Note: See TracBrowser for help on using the repository browser.