Skip to content
This repository was archived by the owner on Aug 19, 2021. It is now read-only.

Add additional tests/profiling #4

Merged
merged 8 commits into from
Jul 14, 2016
Merged

Add additional tests/profiling #4

merged 8 commits into from
Jul 14, 2016

Conversation

geky
Copy link
Contributor

@geky geky commented Jul 14, 2016

Five different tests are now available:

  • Compilation of mbed-events with mbedmicro/mbed.

    mbed compile --library -t GCC_ARM -m K64F
  • Runtime tests in TESTS/events/queue/main.cpp.

    mbed add https://github.com/mbedmicro/mbed
    mbed compile -t GCC_ARM -m K64F --source=. --source=TESTS/events/queue/
    sudo pyocd-flashtool .build/K64F/GCC_ARM/*.bin
    mbedhtrun --skip-flashing --skip-reset --port=/dev/ttyACM0:9600
  • Strict c99 pedantic compilation of events-c. This should help prevent issues such as remove unvwanted return statment #3.

    CFLAGS='-pedantic -Werror' make -C events-c
  • Runtime tests in events-c/tests/tests.c.

    make -C events-c test
  • Profiling in events-c/tests/prof.c (viewable in travis.ci). More info here.

    make -C events-c prof

Every test is supported CI except for runtime tests for mbed-events due to hardware requirements.

geky added 8 commits July 11, 2016 02:12
Events triggered with negative delays are discarded immediately
with no side-effects or memory leaks and an unused id is returned.
No undefined behaviour.
compiled with 'gcc -std=c99 -pedantic -Wall -Werror'
note: tests/tests.c non-conformant
Simple cycle-measuring based profiling setup in tests/prof.c
- uses rdtsc instruction for cycle-level measurement
- averages each test repeatedly over PROF_INTERVAL cycles
- test best result of PROF_RUNS runs to throw out unexpected interrupts
- percentage comparison with previous versions for tangible results

To profile a single instance:
make prof

To compare two runs (this will show rough measurement error):
make prof > results.txt && cat results.txt | make prof
da0e401 Updated README.md with information on tests/profiling
dcb356a Cleaned up makefile
ba0c701 Added rudimentary profiling
5ac2216 Added c99 pedantic test
312f9c2 Removed non-c99 conformant code
057e2a1 Defined behaviour of negative delays to discard event
- strict c99 pedantic test
- runtime tests
- rdtsc based profiling
@geky geky merged commit 6be60bf into master Jul 14, 2016
@geky geky deleted the tests branch July 14, 2016 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant