Commit b8c06bb9 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Add memory tests. Disable perf tests.

parent dda891c4
Pipeline #75 passed with stage
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
build/ build/
bin/ bin/
*.cmake *.cmake
prrt.cpython-35m-x86_64-linux-gnu.so
src/cython/prrt.c src/cython/prrt.c
CMakeCache.txt CMakeCache.txt
CMakeFiles/ CMakeFiles/
Makefile
cython_debug/ cython_debug/
Makefile prrt.cpython*.so
\ No newline at end of file \ No newline at end of file
...@@ -8,12 +8,18 @@ before_script: ...@@ -8,12 +8,18 @@ before_script:
- cmake . - cmake .
- make - make
performanceEvaluation: memcheck:
script: script:
- python3 setup.py build_ext --inplace - export prrtResult=0
- make perftest - valgrind --tool=memcheck --track-origins=yes --leak-check=full --error-exitcode=1 ./bin/receiver 5000 & export prrtReceiverProcessID=$!
- valgrind --tool=memcheck --track-origins=yes --leak-check=full --error-exitcode=1 ./bin/sender 100 || prrtResult=$?; kill -INT $prrtReceiverProcessID; wait $prrtReceiverProcessID || prrtResult=$?
- exit $prrtResult
#performanceEvaluation:
# script:
# - python3 setup.py build_ext --inplace
# - make perftest
tests: tests:
script: script:
- ./bin/prrtTests - ./bin/prrtTests
cython/prrt.c
\ No newline at end of file
...@@ -5,12 +5,14 @@ ...@@ -5,12 +5,14 @@
#include "util/dbg.h" #include "util/dbg.h"
#include "prrt/socket.h" #include "prrt/socket.h"
int main(int argc, char *const argv) { int main(int argc, char *const argv[]) {
int i; if (argc != 2) {
if (argc != 1) {
printf("Sender: Too few arguments.\n"); printf("Sender: Too few arguments.\n");
return -1;
} }
uint16_t rounds = (uint16_t) atoi(argv[1]);
uint16_t local_port = 6000; uint16_t local_port = 6000;
PrrtSocket* socket = NULL; PrrtSocket* socket = NULL;
printf("PRRT - SENDER\n"); printf("PRRT - SENDER\n");
...@@ -29,8 +31,6 @@ int main(int argc, char *const argv) { ...@@ -29,8 +31,6 @@ int main(int argc, char *const argv) {
debug("SENDING\n"); debug("SENDING\n");
uint32_t j = 0; uint32_t j = 0;
int rounds = 10000;
while(j < rounds) { while(j < rounds) {
char buf[MAX_PAYLOAD_LENGTH]; char buf[MAX_PAYLOAD_LENGTH];
sprintf(buf, "%10d", j+1); sprintf(buf, "%10d", j+1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment