Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
klee_tutorial
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
Ruben Asplund
klee_tutorial
Commits
139aded0
Commit
139aded0
authored
4 years ago
by
Ruben Asplund
Browse files
Options
Downloads
Patches
Plain Diff
Deleted out commented code
parent
04f32dd5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
srp_analysis/src/main.rs
+1
-70
1 addition, 70 deletions
srp_analysis/src/main.rs
with
1 addition
and
70 deletions
srp_analysis/src/main.rs
+
1
−
70
View file @
139aded0
...
@@ -217,72 +217,3 @@ fn longest_blocking(trace: &Trace, r: &str) -> u32 {
...
@@ -217,72 +217,3 @@ fn longest_blocking(trace: &Trace, r: &str) -> u32 {
}
}
return
max_block
;
return
max_block
;
}
}
/*
fn blocking(task: &Task, tasks: &Tasks, ip: &IdPrio, tr: &TaskResources) -> u32 {
// Checks if the Task is claming a resource
if !tr.contains_key(&task.id) {
return 0;
}
// Find lower prio tasks that holds a resource
let mut lower_prio_tasks = HashSet::new();
for t in tasks {
if t.prio < task.prio && tr.contains_key(&t.id) {
lower_prio_tasks.insert(t.id.to_string());
}
}
if lower_prio_tasks.len() == 0 {
return 0;
}
let resources = &tr[&task.id];
println!("{:?}", tr);
println!("{:?}", resources);
// Checking every resource it holds
let mut max_block = 0;
let mut current_block = 0;
// Iterate through current task resources
for r1 in resources {
// Iterate through lower prio tasks
for t_id in &lower_prio_tasks {
let mut lower_prio_task_resources = &tr[t_id];
// Iterate through lower prio task resources
for r2 in lower_prio_task_resources {
// When current task use the same resource as a task
if r1 == r2 {
// Takes forward the blocking task
for t in tasks {
if &t.id == t_id {
// Iterate through first layer
for inner in &t.trace.inner {
if &inner.id == r2 {
current_block = inner.end.wrapping_sub(inner.start);
if max_block < current_block {
max_block = current_block;
}
}
// Iterate through second layer
for inner2 in &inner.inner {
if &inner2.id == r2 {
current_block = inner2.end.wrapping_sub(inner2.start);
if max_block < current_block {
max_block = current_block;
}
}
// Iterate through third layer
for inner3 in &inner2.inner {
current_block = inner2.end.wrapping_sub(inner2.start);
if max_block < current_block {
max_block = current_block;
}
}
}
}
}
}
}
}
}
}
return max_block;
}
*/
\ No newline at end of file
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