Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2379, implement SB bulk transfer test #2380

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Add a functional test that moves a large number of messages across the bus as fast as possible (i.e. with no delay). The process is timed, thus offering some metric as to the single thread/single core performance of the software bus implementation underneath.

Note that due to vast differences between hardware, results should only be compared between successive runs on the exact same hardware, such as before and after a change was made.

Fixes #2379

Testing performed
Execute test before and after changes made

Expected behavior changes
Introduce some form of performance check for SB implementation

System(s) tested on
Debian

Additional context
The test itself only shows microseconds elapsed (because this metric is available from the PSP today) but the software can also be run under an external profiling tool for more info.

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Add a functional test that moves a large number of messages across the
bus as fast as possible (i.e. with no delay).  The process is timed, thus
offering some metric as to the single thread/single core performance of
the software bus implementation underneath.

Note that due to vast differences between hardware, results should only
be compared between successive runs on the exact same hardware, such as
before and after a change was made.
static const CFE_SB_MsgId_t CFE_FT_CMD_MSGID = CFE_SB_MSGID_WRAP_VALUE(CFE_TEST_CMD_MID);
static const CFE_SB_MsgId_t CFE_FT_TLM_MSGID = CFE_SB_MSGID_WRAP_VALUE(CFE_TEST_HK_TLM_MID);

void TestBulkTransmitRecv(void)

Check notice

Code scanning / CodeQL

Function too long

TestBulkTransmitRecv has too many lines (86, while 60 are allowed).
* This test procedure should be agnostic to specific MID values, but it should
* not overlap/interfere with real MIDs used by other apps.
*/
static const CFE_SB_MsgId_t CFE_FT_CMD_MSGID = CFE_SB_MSGID_WRAP_VALUE(CFE_TEST_CMD_MID);

Check notice

Code scanning / CodeQL

Variable scope too large

The variable CFE_FT_CMD_MSGID is only accessed in [TestBulkTransmitRecv](1) and should be scoped accordingly.
* not overlap/interfere with real MIDs used by other apps.
*/
static const CFE_SB_MsgId_t CFE_FT_CMD_MSGID = CFE_SB_MSGID_WRAP_VALUE(CFE_TEST_CMD_MID);
static const CFE_SB_MsgId_t CFE_FT_TLM_MSGID = CFE_SB_MSGID_WRAP_VALUE(CFE_TEST_HK_TLM_MID);

Check notice

Code scanning / CodeQL

Variable scope too large

The variable CFE_FT_TLM_MSGID is only accessed in [TestBulkTransmitRecv](1) and should be scoped accordingly.
static const CFE_SB_MsgId_t CFE_FT_CMD_MSGID = CFE_SB_MSGID_WRAP_VALUE(CFE_TEST_CMD_MID);
static const CFE_SB_MsgId_t CFE_FT_TLM_MSGID = CFE_SB_MSGID_WRAP_VALUE(CFE_TEST_HK_TLM_MID);

void TestBulkTransmitRecv(void)

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
@dzbaker dzbaker added CCB:Approved Indicates code review and approval by community CCB Equuleus-rc2 labels Jul 20, 2023
dzbaker added a commit to nasa/cFS that referenced this pull request Sep 1, 2023
*Combines:*

cFE v7.0.0-rc4+dev384
psp v1.6.0-rc4+dev90
osal v6.0.0-rc4+dev229
elf2cfetbl v3.3.0-rc4+dev36
ci_lab v2.5.0-rc4+dev47

**Includes:**

*cFE*
- nasa/cFE#2401
- nasa/cFE#2403
- nasa/cFE#2380
- nasa/cFE#2400
- nasa/cFE#2420

*psp*
- nasa/PSP#395
- nasa/PSP#400

*osal*
- nasa/osal#1409

*elf2cfetbl*
- nasa/elf2cfetbl#137
- nasa/elf2cfetbl#136

*ci_lab*
- nasa/ci_lab#143

Co-authored by: Justin Figueroa <chillfig@users.noreply.github.com>
Co-authored by: Jacob Hageman  <skliper@users.noreply.github.com>
Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored by: Jacob Killelea <jkillelea@users.noreply.github.com>
Co-authored by: Dylan Z. Baker <dzbaker@users.noreply.github.com>
@dzbaker dzbaker mentioned this pull request Sep 1, 2023
2 tasks
dzbaker added a commit to nasa/cFS that referenced this pull request Sep 1, 2023
*Combines:*

cFE v7.0.0-rc4+dev384
psp v1.6.0-rc4+dev90
osal v6.0.0-rc4+dev229
elf2cfetbl v3.3.0-rc4+dev36
ci_lab v2.5.0-rc4+dev47

**Includes:**

*cFE*
- nasa/cFE#2401
- nasa/cFE#2403
- nasa/cFE#2380
- nasa/cFE#2400
- nasa/cFE#2420

*psp*
- nasa/PSP#395
- nasa/PSP#400

*osal*
- nasa/osal#1409

*elf2cfetbl*
- nasa/elf2cfetbl#137
- nasa/elf2cfetbl#136

*ci_lab*
- nasa/ci_lab#143

Co-authored by: Justin Figueroa <chillfig@users.noreply.github.com>
Co-authored by: Jacob Hageman  <skliper@users.noreply.github.com>
Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored by: Jacob Killelea <jkillelea@users.noreply.github.com>
Co-authored by: Dylan Z. Baker <dzbaker@users.noreply.github.com>
dzbaker added a commit to nasa/cFS that referenced this pull request Sep 1, 2023
*Combines:*

cFE v7.0.0-rc4+dev384
psp v1.6.0-rc4+dev90
osal v6.0.0-rc4+dev229
elf2cfetbl v3.3.0-rc4+dev36
ci_lab v2.5.0-rc4+dev47

**Includes:**

*cFE*
- nasa/cFE#2401
- nasa/cFE#2403
- nasa/cFE#2380
- nasa/cFE#2400
- nasa/cFE#2420

*psp*
- nasa/PSP#395
- nasa/PSP#400

*osal*
- nasa/osal#1409

*elf2cfetbl*
- nasa/elf2cfetbl#137
- nasa/elf2cfetbl#136

*ci_lab*
- nasa/ci_lab#143

Co-authored by: Justin Figueroa <chillfig@users.noreply.github.com>
Co-authored by: Jacob Hageman  <skliper@users.noreply.github.com>
Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored by: Jacob Killelea <jkillelea@users.noreply.github.com>
Co-authored by: Dylan Z. Baker <dzbaker@users.noreply.github.com>
dzbaker added a commit to nasa/cFS that referenced this pull request Sep 1, 2023
*Combines:*

cFE v7.0.0-rc4+dev384
psp v1.6.0-rc4+dev90
osal v6.0.0-rc4+dev229
elf2cfetbl v3.3.0-rc4+dev36
ci_lab v2.5.0-rc4+dev47

**Includes:**

*cFE*
- nasa/cFE#2401
- nasa/cFE#2403
- nasa/cFE#2380
- nasa/cFE#2400
- nasa/cFE#2420

*psp*
- nasa/PSP#395
- nasa/PSP#400

*osal*
- nasa/osal#1409

*elf2cfetbl*
- nasa/elf2cfetbl#137
- nasa/elf2cfetbl#136

*ci_lab*
- nasa/ci_lab#143

Co-authored by: Justin Figueroa <chillfig@users.noreply.github.com>
Co-authored by: Jacob Hageman  <skliper@users.noreply.github.com>
Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored by: Jacob Killelea <jkillelea@users.noreply.github.com>
Co-authored by: Dylan Z. Baker <dzbaker@users.noreply.github.com>
@dzbaker dzbaker merged commit 92887fa into nasa:main Sep 1, 2023
dzbaker added a commit to nasa/cFS that referenced this pull request Sep 1, 2023
*Combines:*

cFE v7.0.0-rc4+dev384
psp v1.6.0-rc4+dev90
osal v6.0.0-rc4+dev229
elf2cfetbl v3.3.0-rc4+dev36
ci_lab v2.5.0-rc4+dev47

**Includes:**

*cFE*
- nasa/cFE#2401
- nasa/cFE#2403
- nasa/cFE#2380
- nasa/cFE#2400
- nasa/cFE#2420

*psp*
- nasa/PSP#395
- nasa/PSP#400

*osal*
- nasa/osal#1409

*elf2cfetbl*
- nasa/elf2cfetbl#137
- nasa/elf2cfetbl#136

*ci_lab*
- nasa/ci_lab#143

Co-authored by: Justin Figueroa <chillfig@users.noreply.github.com>
Co-authored by: Jacob Hageman  <skliper@users.noreply.github.com>
Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored by: Jacob Killelea <jkillelea@users.noreply.github.com>
Co-authored by: Dylan Z. Baker <dzbaker@users.noreply.github.com>
@jphickey jphickey deleted the fix-2379-sb-perftest branch November 16, 2023 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB Equuleus-rc2 unit-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement software bus bulk transfer functional test
3 participants