source: rtems-central/spec/rtems/message/req/perf-send-other-cpu.yml @ 9d7f2a1

Last change on this file since 9d7f2a1 was 9d7f2a1, checked in by Sebastian Huber <sebastian.huber@…>, on 11/25/21 at 09:03:22

spec: Add performance requirements

  • Property mode set to 100644
File size: 2.1 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    Send a message.
19  code: |
20    uint64_t message;
21
22    ctx->begin = T_tick();
23    ctx->status = rtems_message_queue_send(
24      ctx->queue_id,
25      &message,
26      sizeof( message )
27    );
28  description: null
29test-cleanup:
30  brief: |
31    Move worker to scheduler A.
32  code: |
33    SetScheduler( ctx->worker_id, SCHEDULER_A_ID, PRIO_HIGH );
34  description: null
35test-prepare:
36  brief: |
37    Move worker to scheduler B.
38  code: |
39    SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
40  description: null
41test-setup:
42  brief: |
43    Let the worker wait on the message queue.
44  code: |
45    Send( ctx, EVENT_RECEIVE | EVENT_RECEIVE_END );
46    WaitForNextTask( 1, ctx->worker_id );
47  description: null
48test-teardown:
49  brief: |
50    Set the measured runtime.  Make sure the worker waits for the next event.
51    Discard samples interrupted by a clock tick.
52  code: |
53    T_quiet_rsc_success( ctx->status );
54
55    *delta = ctx->end - ctx->begin;
56    WaitForNextTask( 1, ctx->worker_id );
57
58    return tic == toc;
59  description: null
60text: |
61  Let ``U` and `V`` be two tasks with distinct home schedulers.  Let :math:`B`
62  be a time point measured by ``U`` right before a call to ${../if/send:/name}
63  which unblocks the waiting task ``V`` which is scheduled on another
64  processor.  Let :math:`E` be a time point measured by ``V`` right after the
65  first context switch after :math:`B`.
66
67  While the execution environment is ${.:/environment}, while a message queue
68  is empty, while only task ``V`` waits on the message queue, while the
69  measurement sample is :math:`E - B`, when exactly
70  ${../val/perf:/params/sample-count} samples are collected, the
71  ${.:/limit-kind} shall be ${.:/limit-condition}.
72type: requirement
Note: See TracBrowser for help on using the repository browser.