Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
PRRT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
37
Issues
37
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LARN
PRRT
Commits
19aa93bc
Commit
19aa93bc
authored
May 31, 2017
by
Andreas Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix eval test to work again.
parent
09af2d16
Pipeline
#950
passed with stages
in 1 minute and 7 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
prrt/cprrt.pxd
prrt/cprrt.pxd
+11
-0
prrt/prrt.pyx
prrt/prrt.pyx
+16
-0
tests/perf/__init__.py
tests/perf/__init__.py
+0
-2
No files found.
prrt/cprrt.pxd
View file @
19aa93bc
...
...
@@ -120,6 +120,17 @@ cdef extern from "proto/socket.h":
bint
PrrtSocket_set_sock_opt
(
PrrtSocket
*
sock_ptr
,
const_char
*
name
,
const
uint32_t
value
)
uint32_t
PrrtSocket_get_sock_opt
(
PrrtSocket
*
sock_ptr
,
const_char
*
name
)
cdef
extern
from
"proto/timestamp.h"
:
ctypedef
struct
PrrtTimestampTable
:
pass
cdef
enum
PrrtTimestampPacketKind
:
ts_data_packet
=
0
,
ts_any_packet
=
0
,
ts_redundancy_packet
=
1
void
PrrtTimestampTableInstall
(
PrrtSocket
*
sck
,
PrrtTimestampPacketKind
kind
,
PrrtTimestampTable
*
tstp
);
cdef
extern
from
"util/bptree.h"
:
ctypedef
struct
BPTreeNode
:
pass
...
...
prrt/prrt.pyx
View file @
19aa93bc
from
libc.stdint
cimport
uint32_t
,
uint16_t
,
uint8_t
,
int32_t
from
libc.stdlib
cimport
malloc
,
free
cimport
cprrt
cdef
extern
from
"proto/applicationConstraints.c"
:
pass
cdef
extern
from
"proto/timestamp.c"
:
pass
cdef
extern
from
"proto/stores/dataPacketStore.c"
:
pass
...
...
@@ -67,10 +72,19 @@ cdef extern from "util/list.c":
cdef
class
PrrtSocket
:
cdef
cprrt
.
PrrtSocket
*
_c_socket
cdef
bint
isSender
cdef
cprrt
.
PrrtTimestampTable
*
tstable_data
cdef
cprrt
.
PrrtTimestampTable
*
tstable_redundancy
def
__cinit__
(
self
,
port
,
isSender
):
self
.
_c_socket
=
cprrt
.
PrrtSocket_create
(
isSender
)
cprrt
.
PrrtSocket_bind
(
self
.
_c_socket
,
"0.0.0.0"
,
port
)
self
.
tstable_data
=
<
cprrt
.
PrrtTimestampTable
*>
malloc
(
sizeof
(
cprrt
.
PrrtTimestampTable
))
self
.
tstable_redundancy
=
<
cprrt
.
PrrtTimestampTable
*>
malloc
(
sizeof
(
cprrt
.
PrrtTimestampTable
))
cprrt
.
PrrtTimestampTableInstall
(
self
.
_c_socket
,
cprrt
.
ts_data_packet
,
self
.
tstable_data
)
cprrt
.
PrrtTimestampTableInstall
(
self
.
_c_socket
,
cprrt
.
ts_redundancy_packet
,
self
.
tstable_redundancy
)
self
.
isSender
=
isSender
property
target_delay
:
...
...
@@ -102,3 +116,5 @@ cdef class PrrtSocket:
def
__dealloc__
(
self
):
if
self
.
_c_socket
!=
NULL
:
cprrt
.
PrrtSocket_close
(
self
.
_c_socket
)
free
(
self
.
tstable_data
)
free
(
self
.
tstable_redundancy
)
tests/perf/__init__.py
View file @
19aa93bc
...
...
@@ -54,8 +54,6 @@ class SenderThread(threading.Thread):
self
.
sock
.
send
(
d
)
time
.
sleep
(
0.00001
)
self
.
sock
.
close
()
class
TestResults
(
object
):
def
__init__
(
self
):
self
.
loss
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment