Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batmen
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
sepia-pub
mael
batmen
Commits
9f320dd0
Commit
9f320dd0
authored
2 years ago
by
Maël Madon
Browse files
Options
Downloads
Patches
Plain Diff
clean: removed unused classes
parent
049697ef
Branches
Branches containing commit
No related tags found
1 merge request
!4
Clean repo
Pipeline
#4534
passed
2 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
meson.build
+0
-2
0 additions, 2 deletions
meson.build
src/queueing_theory_waiting_time_estimator.cpp
+0
-54
0 additions, 54 deletions
src/queueing_theory_waiting_time_estimator.cpp
src/queueing_theory_waiting_time_estimator.hpp
+0
-20
0 additions, 20 deletions
src/queueing_theory_waiting_time_estimator.hpp
with
0 additions
and
76 deletions
meson.build
+
0
−
2
View file @
9f320dd0
...
...
@@ -67,8 +67,6 @@ src = [
'src/protocol.hpp'
,
'src/queue.cpp'
,
'src/queue.hpp'
,
'src/queueing_theory_waiting_time_estimator.cpp'
,
'src/queueing_theory_waiting_time_estimator.hpp'
,
'src/schedule.cpp'
,
'src/schedule.hpp'
]
...
...
This diff is collapsed.
Click to expand it.
src/queueing_theory_waiting_time_estimator.cpp
deleted
100644 → 0
+
0
−
54
View file @
049697ef
#include
"queueing_theory_waiting_time_estimator.hpp"
#include
"pempek_assert.hpp"
void
QueueingTheoryWaitingTimeEstimator
::
add_submitted_job
(
const
Job
*
job
)
{
_recently_submitted_jobs
.
push_back
(
job
);
}
void
QueueingTheoryWaitingTimeEstimator
::
add_completed_job
(
const
Job
*
job
)
{
_recently_completed_jobs
.
push_back
(
job
);
}
void
QueueingTheoryWaitingTimeEstimator
::
remove_old
(
Rational
old_date_thresh
)
{
for
(
auto
submit_lit
=
_recently_submitted_jobs
.
begin
();
submit_lit
!=
_recently_submitted_jobs
.
end
();
)
{
const
Job
*
job
=
*
submit_lit
;
if
(
job
->
submission_time
<
old_date_thresh
)
submit_lit
=
_recently_submitted_jobs
.
erase
(
submit_lit
);
else
break
;
}
for
(
auto
complete_lit
=
_recently_completed_jobs
.
begin
();
complete_lit
!=
_recently_completed_jobs
.
end
();
)
{
const
Job
*
job
=
*
complete_lit
;
if
(
job
->
completion_time
<
old_date_thresh
)
complete_lit
=
_recently_completed_jobs
.
erase
(
complete_lit
);
else
break
;
}
}
Rational
QueueingTheoryWaitingTimeEstimator
::
estimate_waiting_time
(
Rational
period_length
)
{
PPK_ASSERT_ERROR
(
period_length
>
0
);
Rational
arrival_rate
=
_recently_submitted_jobs
.
size
()
/
period_length
;
Rational
service_rate
=
_recently_completed_jobs
.
size
()
/
period_length
;
if
(
arrival_rate
!=
service_rate
&&
service_rate
!=
0
)
return
(
1
/
(
service_rate
-
arrival_rate
))
-
(
1
/
service_rate
);
else
return
std
::
numeric_limits
<
Rational
>::
infinity
();
}
Rational
QueueingTheoryWaitingTimeEstimator
::
estimate_waiting_time_by_area
(
Rational
period_length
,
int
nb_awake_machines
)
{
(
void
)
period_length
;
(
void
)
nb_awake_machines
;
PPK_ASSERT_ERROR
(
false
,
"Not implemented"
);
return
0
;
}
This diff is collapsed.
Click to expand it.
src/queueing_theory_waiting_time_estimator.hpp
deleted
100644 → 0
+
0
−
20
View file @
049697ef
#pragma once
#include
<list>
#include
"json_workload.hpp"
#include
"exact_numbers.hpp"
struct
QueueingTheoryWaitingTimeEstimator
{
void
add_submitted_job
(
const
Job
*
job
);
void
add_completed_job
(
const
Job
*
job
);
void
remove_old
(
Rational
old_date_thresh
);
Rational
estimate_waiting_time
(
Rational
period_length
);
Rational
estimate_waiting_time_by_area
(
Rational
period_length
,
int
nb_awake_machines
);
private:
std
::
list
<
const
Job
*>
_recently_submitted_jobs
;
std
::
list
<
const
Job
*>
_recently_completed_jobs
;
};
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