Commit f4216e4d authored by Andreas Schmidt's avatar Andreas Schmidt

WIP: evaluate block-refactor efficiency

parent 6b093d47
Pipeline #3135 passed with stages
in 2 minutes and 31 seconds
...@@ -52,6 +52,17 @@ build:container_tcp: ...@@ -52,6 +52,17 @@ build:container_tcp:
- docker push $CI_REGISTRY_IMAGE:$DOCKER_TAG - docker push $CI_REGISTRY_IMAGE:$DOCKER_TAG
- docker rmi $CI_REGISTRY_IMAGE:$DOCKER_TAG - docker rmi $CI_REGISTRY_IMAGE:$DOCKER_TAG
build:container_xlap:
stage: build
tags:
- docker
script:
- export DOCKER_TAG=$(echo "$CI_BUILD_REF_NAME""_xlap" | sed 's#/#_#' | sed 's#^master$#latest#')
- docker build -t $CI_REGISTRY_IMAGE:$DOCKER_TAG --build-arg http_proxy=http://www-proxy.uni-saarland.de:3128 -f docker/Dockerfile_xlap .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE:$DOCKER_TAG
- docker rmi $CI_REGISTRY_IMAGE:$DOCKER_TAG
test:prrt_mem: test:prrt_mem:
stage: test stage: test
dependencies: dependencies:
......
FROM gcc:5
MAINTAINER Andreas Schmidt <schmidt@nt.uni-saarland.de>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install --yes --force-yes \
bc \
cmake \
traceroute \
tshark
COPY CMakeLists.txt /prrt/
COPY prrt /prrt/prrt
COPY tests /prrt/tests
COPY docker/entrypoint.sh /
WORKDIR /prrt
RUN cmake -DCMAKE_BUILD_TYPE=Debug -DXLAP=1 -DDEBUG=1 . \
&& make -i
ENV PATH /prrt:$PATH
VOLUME /output
ENTRYPOINT ["/entrypoint.sh"]
...@@ -59,6 +59,7 @@ PrrtSocket *PrrtSocket_create(prrtByteCount_t maximum_payload_size, prrtTimedelt ...@@ -59,6 +59,7 @@ PrrtSocket *PrrtSocket_create(prrtByteCount_t maximum_payload_size, prrtTimedelt
s->interfaceName = NULL; s->interfaceName = NULL;
s->retransmissionTimer = PrrtTimer_create(3); s->retransmissionTimer = PrrtTimer_create(3);
assert(s->retransmissionTimer != NULL);
s->isThreadPinning = false; s->isThreadPinning = false;
......
#include "timer.h" #include "timer.h"
#include "../util/common.h"
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
...@@ -289,12 +290,15 @@ PrrtTimer *PrrtTimer_create(unsigned int core) ...@@ -289,12 +290,15 @@ PrrtTimer *PrrtTimer_create(unsigned int core)
int err; int err;
PrrtTimer *self = malloc(sizeof(PrrtTimer)); PrrtTimer *self = malloc(sizeof(PrrtTimer));
if (!self) if (!self) {
PERROR("Memory issue: could not malloc self");
return NULL; return NULL;
}
// create dummy node // create dummy node
TimerNode *node = malloc(sizeof(TimerNode)); TimerNode *node = malloc(sizeof(TimerNode));
if (!node) { if (!node) {
PERROR("Memory issue: could not malloc dummy node");
free(self); free(self);
return NULL; return NULL;
} }
...@@ -364,6 +368,10 @@ PrrtTimer *PrrtTimer_create(unsigned int core) ...@@ -364,6 +368,10 @@ PrrtTimer *PrrtTimer_create(unsigned int core)
int PrrtTimer_submit(PrrtTimer *self, const TimerDate *when, const PrrtTimerTask *what) int PrrtTimer_submit(PrrtTimer *self, const TimerDate *when, const PrrtTimerTask *what)
{ {
assert(self && "got nullptr as self");
assert(self->old && "self->old is null");
assert(self->alive);
TimerNode *iter, *stop, *next; TimerNode *iter, *stop, *next;
TimerNode *node = malloc(sizeof(TimerNode)); TimerNode *node = malloc(sizeof(TimerNode));
if (!node) if (!node)
......
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
#include <string.h> #include <string.h>
#define DEBUG_ALL 0 #define DEBUG_ALL 0
#define DEBUG_BBR 1 #define DEBUG_BBR 0
#define DEBUG_BLOCK 0 #define DEBUG_BLOCK 0
#define DEBUG_PACKET 0 #define DEBUG_PACKET 0
#define DEBUG_RECEIVER 1 #define DEBUG_RECEIVER 0
#define DEBUG_SENDER 0 #define DEBUG_SENDER 0
#define DEBUG_SOCKET 0 #define DEBUG_SOCKET 1
#define DEBUG_DATARECEIVER 0 #define DEBUG_DATARECEIVER 0
#define DEBUG_CLEANUP 1 #define DEBUG_CLEANUP 1
#define DEBUG_DATATRANSMITTER 0 #define DEBUG_DATATRANSMITTER 1
#define DEBUG_HARDSTAMPING 0 #define DEBUG_HARDSTAMPING 0
#define DEBUG_FEEDBACK 0 #define DEBUG_FEEDBACK 0
......
Markdown is supported
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