Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs425MP0
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
milindl2
cs425MP0
Commits
1f129815
Commit
1f129815
authored
2 years ago
by
nwp2
Browse files
Options
Downloads
Patches
Plain Diff
data anylasis
parent
f515c744
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
anyalize.py
+32
-0
32 additions, 0 deletions
anyalize.py
timing_log.csv
+0
-1
0 additions, 1 deletion
timing_log.csv
with
32 additions
and
1 deletion
anyalize.py
0 → 100644
+
32
−
0
View file @
1f129815
import
pandas
as
pd
import
numpy
as
np
data
=
pd
.
read_csv
(
"
timing_log.csv
"
)
def
get_period
(
df
,
start
,
end
):
selection
=
[]
for
index
,
row
in
df
.
iterrows
():
if
row
.
send_time
>
start
and
row
.
send_time
<=
end
:
selection
.
append
(
row
)
if
len
(
selection
)
==
1
:
start_bandwidth
=
row
.
bandwidth
if
row
.
send_time
>
end
:
end_bandwidth
=
row
.
bandwidth
break
return
(
pd
.
DataFrame
(
selection
),
end_bandwidth
-
start_bandwidth
)
def
get_stats
(
df
,
start
,
end
):
(
period
,
bandwidth
)
=
get_period
(
data
,
start
,
end
)
diffs
=
period
.
send_time
-
period
.
recv_time
th90
=
np
.
percentile
(
diffs
,
90
)
med
=
np
.
median
(
diffs
)
data_min
=
np
.
min
(
diffs
)
data_max
=
np
.
max
(
diffs
)
return
[
th90
,
med
,
data_min
,
data_max
,
bandwidth
]
print
(
get_stats
(
data
,
1674699826
,
1674699826
+
1
))
\ No newline at end of file
This diff is collapsed.
Click to expand it.
timing_log.csv
+
0
−
1
View file @
1f129815
send_time,recv_time,bandwidth
send_time,recv_time,bandwidth
1674699826.054224,1674699826.053831,82
1674699826.054340,1674699826.0539804,165
1674699826.054224,1674699826.053831,82
...
...
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