From 6438f3d29e89eea6f5e1e249d4c880056bf4759e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 28 May 2021 07:43:26 +0200 Subject: spec: Add runtime performance requirements --- spec/req/perf-runtime.yml | 14 ++++ spec/rtems/part/req/perf-get-buffer.yml | 4 +- spec/rtems/part/req/perf-get-no-buffer.yml | 4 +- spec/rtems/part/req/perf-return-buffer.yml | 4 +- spec/rtems/part/req/perf-runtime.yml | 14 ++++ spec/rtems/part/val/perf.yml | 101 +++++++++++++++++++++++++++++ spec/rtems/part/val/performance.yml | 99 ---------------------------- spec/rtems/req/perf-runtime.yml | 14 ++++ 8 files changed, 152 insertions(+), 102 deletions(-) create mode 100644 spec/req/perf-runtime.yml create mode 100644 spec/rtems/part/req/perf-runtime.yml create mode 100644 spec/rtems/part/val/perf.yml delete mode 100644 spec/rtems/part/val/performance.yml create mode 100644 spec/rtems/req/perf-runtime.yml diff --git a/spec/req/perf-runtime.yml b/spec/req/perf-runtime.yml new file mode 100644 index 00000000..9e33cf1a --- /dev/null +++ b/spec/req/perf-runtime.yml @@ -0,0 +1,14 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de +enabled-by: true +links: +- role: requirement-refinement + uid: root +non-functional-type: performance +rationale: null +references: [] +requirement-type: non-functional +text: | + The runtime of interface functions shall be measured. +type: requirement diff --git a/spec/rtems/part/req/perf-get-buffer.yml b/spec/rtems/part/req/perf-get-buffer.yml index 43ee6bc8..15fbdad3 100644 --- a/spec/rtems/part/req/perf-get-buffer.yml +++ b/spec/rtems/part/req/perf-get-buffer.yml @@ -26,8 +26,10 @@ limits: max-upper-bound: 1.0e-05 mean-upper-bound: 1.0e-05 links: +- role: requirement-refinement + uid: perf-runtime - role: runtime-measurement-request - uid: ../val/performance + uid: ../val/perf non-functional-type: performance-runtime params: {} rationale: null diff --git a/spec/rtems/part/req/perf-get-no-buffer.yml b/spec/rtems/part/req/perf-get-no-buffer.yml index df7871f4..f8614a3d 100644 --- a/spec/rtems/part/req/perf-get-no-buffer.yml +++ b/spec/rtems/part/req/perf-get-no-buffer.yml @@ -4,8 +4,10 @@ copyrights: enabled-by: true limits: {} links: +- role: requirement-refinement + uid: perf-runtime - role: runtime-measurement-request - uid: ../val/performance + uid: ../val/perf non-functional-type: performance-runtime params: {} rationale: null diff --git a/spec/rtems/part/req/perf-return-buffer.yml b/spec/rtems/part/req/perf-return-buffer.yml index 7654e10c..f204d6f2 100644 --- a/spec/rtems/part/req/perf-return-buffer.yml +++ b/spec/rtems/part/req/perf-return-buffer.yml @@ -4,8 +4,10 @@ copyrights: enabled-by: true limits: {} links: +- role: requirement-refinement + uid: perf-runtime - role: runtime-measurement-request - uid: ../val/performance + uid: ../val/perf non-functional-type: performance-runtime params: {} rationale: null diff --git a/spec/rtems/part/req/perf-runtime.yml b/spec/rtems/part/req/perf-runtime.yml new file mode 100644 index 00000000..fb6f99d1 --- /dev/null +++ b/spec/rtems/part/req/perf-runtime.yml @@ -0,0 +1,14 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de +enabled-by: true +links: +- role: requirement-refinement + uid: ../../req/perf-runtime +non-functional-type: performance +rationale: null +references: [] +requirement-type: non-functional +text: | + The runtime of ${../if/group:/name} directives shall be measured. +type: requirement diff --git a/spec/rtems/part/val/perf.yml b/spec/rtems/part/val/perf.yml new file mode 100644 index 00000000..d86bdb2d --- /dev/null +++ b/spec/rtems/part/val/perf.yml @@ -0,0 +1,101 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: validation + uid: ../req/perf-runtime +params: + buffer-count: 100 + sample-count: 1000 +test-brief: | + This test case provides a context to run Partition Manager performance tests. +test-cleanup: null +test-context: +- brief: | + This member provides a partition with exactly one free buffer. + description: null + member: | + rtems_id part_one +- brief: | + This member provides a partition with exactly ${.:/params/buffer-count} + free buffers. + description: null + member: | + rtems_id part_many +- brief: | + This member provides a status code. + description: null + member: | + rtems_status_code status +- brief: | + This member provides a buffer pointer. + description: null + member: | + void *buffer +- brief: | + This member provides a second buffer pointer. + description: null + member: | + void *buffer_2 +test-context-support: null +test-description: null +test-includes: +- rtems.h +- rtems/chain.h +test-local-includes: [] +test-prepare: null +test-setup: + brief: | + Creates the test partition. + code: | + rtems_status_code sc; + size_t size; + void *area; + uintptr_t length; + + size = sizeof( rtems_chain_node ); + + area = T_malloc( size ); + sc = rtems_partition_create( + rtems_build_name( ' ', 'O', 'N', 'E' ), + area, + size, + size, + RTEMS_DEFAULT_ATTRIBUTES, + &ctx->part_one + ); + T_assert_rsc_success( sc ); + + length = ${.:/params/buffer-count} * size; + area = T_malloc( length ); + sc = rtems_partition_create( + rtems_build_name( 'M', 'A', 'N', 'Y' ), + area, + length, + size, + RTEMS_DEFAULT_ATTRIBUTES, + &ctx->part_many + ); + T_assert_rsc_success( sc ); + description: null +test-stop: null +test-support: null +test-target: testsuites/validation/tc-part-performance.c +test-teardown: + brief: | + Deletes the test partition. + code: | + rtems_status_code sc; + + if ( ctx->part_one != 0 ) { + sc = rtems_partition_delete( ctx->part_one ); + T_rsc_success( sc ); + } + + if ( ctx->part_many != 0 ) { + sc = rtems_partition_delete( ctx->part_many ); + T_rsc_success( sc ); + } + description: null +type: runtime-measurement-test diff --git a/spec/rtems/part/val/performance.yml b/spec/rtems/part/val/performance.yml deleted file mode 100644 index 348dc0e2..00000000 --- a/spec/rtems/part/val/performance.yml +++ /dev/null @@ -1,99 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause -copyrights: -- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -enabled-by: true -links: [] -params: - buffer-count: 100 - sample-count: 1000 -test-brief: | - This test case provides a context to run Partition Manager performance tests. -test-cleanup: null -test-context: -- brief: | - This member provides a partition with exactly one free buffer. - description: null - member: | - rtems_id part_one -- brief: | - This member provides a partition with exactly ${.:/params/buffer-count} - free buffers. - description: null - member: | - rtems_id part_many -- brief: | - This member provides a status code. - description: null - member: | - rtems_status_code status -- brief: | - This member provides a buffer pointer. - description: null - member: | - void *buffer -- brief: | - This member provides a second buffer pointer. - description: null - member: | - void *buffer_2 -test-context-support: null -test-description: null -test-includes: -- rtems.h -- rtems/chain.h -test-local-includes: [] -test-prepare: null -test-setup: - brief: | - Creates the test partition. - code: | - rtems_status_code sc; - size_t size; - void *area; - uintptr_t length; - - size = sizeof( rtems_chain_node ); - - area = T_malloc( size ); - sc = rtems_partition_create( - rtems_build_name( ' ', 'O', 'N', 'E' ), - area, - size, - size, - RTEMS_DEFAULT_ATTRIBUTES, - &ctx->part_one - ); - T_assert_rsc_success( sc ); - - length = ${.:/params/buffer-count} * size; - area = T_malloc( length ); - sc = rtems_partition_create( - rtems_build_name( 'M', 'A', 'N', 'Y' ), - area, - length, - size, - RTEMS_DEFAULT_ATTRIBUTES, - &ctx->part_many - ); - T_assert_rsc_success( sc ); - description: null -test-stop: null -test-support: null -test-target: testsuites/validation/tc-part-performance.c -test-teardown: - brief: | - Deletes the test partition. - code: | - rtems_status_code sc; - - if ( ctx->part_one != 0 ) { - sc = rtems_partition_delete( ctx->part_one ); - T_rsc_success( sc ); - } - - if ( ctx->part_many != 0 ) { - sc = rtems_partition_delete( ctx->part_many ); - T_rsc_success( sc ); - } - description: null -type: runtime-measurement-test diff --git a/spec/rtems/req/perf-runtime.yml b/spec/rtems/req/perf-runtime.yml new file mode 100644 index 00000000..139d40e7 --- /dev/null +++ b/spec/rtems/req/perf-runtime.yml @@ -0,0 +1,14 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de +enabled-by: true +links: +- role: requirement-refinement + uid: ../../req/perf-runtime +non-functional-type: performance +rationale: null +references: [] +requirement-type: non-functional +text: | + The runtime of {../if/group:/name} directives shall be measured. +type: requirement -- cgit v1.2.3