Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
trx-ecpri
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
trx-ecpri
Commits
b50e103c
Commit
b50e103c
authored
Jan 24, 2025
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: fix counters and encode thread
parent
8eec87e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
trx_ecpri.c
trx_ecpri.c
+12
-9
No files found.
trx_ecpri.c
View file @
b50e103c
...
...
@@ -295,18 +295,18 @@ static void print_stats(FILE * f, int print_header) {
"%"
STAT_INT_LEN
""
PRIi64
"pps "
"%"
STAT_INT_LEN
""
PRIi64
"pps "
"
\n
"
,
N_SAMPLES
*
sizeof
(
float
)
*
2
*
rx_drop_counter
.
counter
/
IQ_PAYLOAD
,
N_SAMPLES
*
sizeof
(
float
)
*
2
*
tx_drop_counter
.
counter
/
IQ_PAYLOAD
,
(
N_SAMPLES
*
sizeof
(
float
)
*
2
*
rx_drop_counter
.
counter
)
/
IQ_PAYLOAD
,
(
N_SAMPLES
*
sizeof
(
float
)
*
2
*
tx_drop_counter
.
counter
)
/
IQ_PAYLOAD
,
recv_counter
.
counter
,
decode_counter
.
counter
,
N_SAMPLES
*
sizeof
(
float
)
*
2
*
read_counter
.
counter
/
IQ_PAYLOAD
,
N_SAMPLES
*
sizeof
(
float
)
*
2
*
write_counter
.
counter
/
IQ_PAYLOAD
,
(
N_SAMPLES
*
sizeof
(
float
)
*
2
*
read_counter
.
counter
)
/
IQ_PAYLOAD
,
(
N_SAMPLES
*
sizeof
(
float
)
*
2
*
write_counter
.
counter
)
/
IQ_PAYLOAD
,
encode_counter
.
counter
,
sent_counter
.
counter
,
recv_counter
.
pps
,
decode_counter
.
pps
,
read_counter
.
pps
,
write_counter
.
pps
,
(
N_SAMPLES
*
sizeof
(
float
)
*
2
*
read_counter
.
pps
)
/
IQ_PAYLOAD
,
(
N_SAMPLES
*
sizeof
(
float
)
*
2
*
write_counter
.
pps
)
/
IQ_PAYLOAD
,
encode_counter
.
pps
,
sent_counter
.
pps
);
}
...
...
@@ -510,8 +510,11 @@ static void *encode_thread(void *p) {
// If we have frames to encode (is there space in TX buffer)
// And if there are frames from trx_write callback to encode
to_write
=
rbuf_write_amount
(
&
tx_rbuf
)
/
tx_rbuf
.
block_len
;
to_read
=
rbuf_read_amount
(
&
trxw_rbuf
[
0
])
/
trxw_rbuf
[
0
].
block_len
;
to_write
=
rbuf_write_amount
(
&
tx_rbuf
)
/
(
PACKET_SIZE
*
4
);
to_read
=
1
;
for
(
int
k
=
0
;
k
<
s
->
tx_n_channel
;
k
++
)
if
(
rbuf_read_amount
(
&
trxw_rbuf
[
k
])
<
IQ_PAYLOAD
)
to_read
=
0
;
usleep
(
1
);
if
(
!
to_write
||
!
to_read
)
continue
;
...
...
@@ -962,7 +965,7 @@ static void trx_ecpri_write(TRXState *s1, trx_timestamp_t timestamp, const void
count_left
-=
nc
/
sizeof
(
Complex
);
offset
+=
nc
;
}
update_counter
(
&
write_counter
,
count
/
N_SAMPLES
);
update_counter
(
&
write_counter
,
(
s
->
tx_n_channel
*
count
)
/
N_SAMPLES
);
}
/*
...
...
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