Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Benchmarking PQC in QUIC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bartolomeo Berend Müller
Benchmarking PQC in QUIC
Commits
7d8a1c12
Commit
7d8a1c12
authored
2 months ago
by
Bartolomeo Berend Müller
Browse files
Options
Downloads
Patches
Plain Diff
Added loss calcs
parent
f1bfc78a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pq-tls-benchmark-framework/emulation-exp/code/kex/scripts/queries.py
+47
-6
47 additions, 6 deletions
...hmark-framework/emulation-exp/code/kex/scripts/queries.py
with
47 additions
and
6 deletions
pq-tls-benchmark-framework/emulation-exp/code/kex/scripts/queries.py
+
47
−
6
View file @
7d8a1c12
...
@@ -12,7 +12,7 @@ def main():
...
@@ -12,7 +12,7 @@ def main():
data
=
pd
.
read_feather
(
f
"
{
FEATHERS_DIR
}
/data.feather
"
)
data
=
pd
.
read_feather
(
f
"
{
FEATHERS_DIR
}
/data.feather
"
)
# data = pd.read_feather(f"{FEATHERS_DIR}/data_run_20241028.feather")
# data = pd.read_feather(f"{FEATHERS_DIR}/data_run_20241028.feather")
p_no_one_sec_delay
()
loss_calculations
()
# static_scenario_statistical_analysis(data)
# static_scenario_statistical_analysis(data)
# median_of_all_static_runs_per_algorithm(data)
# median_of_all_static_runs_per_algorithm(data)
# stats_of_qtl95_of_packetloss(data)
# stats_of_qtl95_of_packetloss(data)
...
@@ -23,11 +23,11 @@ def main():
...
@@ -23,11 +23,11 @@ def main():
# print_kem_ids()
# print_kem_ids()
def
p_no_one_sec_delay
():
def
loss_calculations
():
udp_packets_df
=
pd
.
read_feather
(
"
feathers/udp_packets.feather
"
)
udp_packets_df
=
pd
.
read_feather
(
"
feathers/udp_packets.feather
"
)
df
=
ap
.
get_packets_sent_by_node
(
udp_packets_df
)
df
=
ap
.
get_packets_sent_by_node
(
udp_packets_df
)
print
(
"
\n\n
No one second delay
"
)
print
(
"
\n\n
Loss calculations
"
)
df
=
df
.
drop
(
columns
=
[
"
length_public_key
"
,
"
length_ciphertext
"
])
df
=
df
.
drop
(
columns
=
[
"
length_public_key
"
,
"
length_ciphertext
"
])
# print(df)
# print(df)
df
[
"
cic
"
]
=
df
[
"
client_sent_packets_with_crypto_count
"
]
-
1
df
[
"
cic
"
]
=
df
[
"
client_sent_packets_with_crypto_count
"
]
-
1
...
@@ -39,9 +39,25 @@ def p_no_one_sec_delay():
...
@@ -39,9 +39,25 @@ def p_no_one_sec_delay():
]
]
)
)
# p_noOneSec does not make sense if cic or sic is bigger than 10 -> look thesis
df
=
df
.
query
(
"
cic <= 10 and sic <= 10
"
)
df
=
df
.
query
(
"
cic <= 10 and sic <= 10
"
)
def
calc_p
(
cic
,
sic
,
l
):
def
calc_p_no_loss
(
cic
,
sic
,
l
):
"""
Calculates the probability p_noLoss.
Args:
cic: client initial count.
sic: server initial count.
l: loss probability.
Returns:
p_noLoss as defined in the thesis.
"""
return
(
1
-
l
)
**
(
cic
+
sic
)
def
calc_p_no_one_sec_delay
(
cic
,
sic
,
l
):
"""
"""
Calculates the probability p_noOneSec.
Calculates the probability p_noOneSec.
...
@@ -65,15 +81,40 @@ def p_no_one_sec_delay():
...
@@ -65,15 +81,40 @@ def p_no_one_sec_delay():
return
term1
+
term2
return
term1
+
term2
# print(df)
def
calc_l_for_no_loss_p
(
cic
,
sic
,
p
):
"""
Calculates the loss probability l for a p_noLoss of 0.95.
Args:
cic: client initial count.
sic: server initial count.
p: probability.
Returns:
l as defined in the thesis.
"""
return
1
-
(
p
**
(
1
/
(
cic
+
sic
)))
for
l
in
[
0.01
,
0.05
,
0.10
,
0.20
]:
for
l
in
[
0.01
,
0.05
,
0.10
,
0.20
]:
df
[
f
"
p_noLoss_
{
l
}
"
]
=
df
.
apply
(
lambda
row
:
calc_p_no_loss
(
row
[
"
cic
"
],
row
[
"
sic
"
],
l
),
axis
=
1
)
df
[
f
"
p_noOneSec_
{
l
}
"
]
=
df
.
apply
(
df
[
f
"
p_noOneSec_
{
l
}
"
]
=
df
.
apply
(
lambda
row
:
calc_p
(
row
[
"
cic
"
],
row
[
"
sic
"
],
l
),
axis
=
1
lambda
row
:
calc_p
_no_one_sec_delay
(
row
[
"
cic
"
],
row
[
"
sic
"
],
l
),
axis
=
1
)
)
df
[
"
l_for_noLoss_p50
"
]
=
df
.
apply
(
lambda
row
:
calc_l_for_no_loss_p
(
row
[
"
cic
"
],
row
[
"
sic
"
],
0.50
),
axis
=
1
)
df
[
"
l_for_noLoss_p95
"
]
=
df
.
apply
(
lambda
row
:
calc_l_for_no_loss_p
(
row
[
"
cic
"
],
row
[
"
sic
"
],
0.95
),
axis
=
1
)
print
(
df
)
print
(
df
)
return
df
def
static_scenario_statistical_analysis
(
data
):
def
static_scenario_statistical_analysis
(
data
):
ldata
=
data
ldata
=
data
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment