Skip to content

Commit

Permalink
Benchmark
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Chang <[email protected]>
  • Loading branch information
mocsharp committed Nov 14, 2024
1 parent f72c127 commit 03ac79c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@
},
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "INFO"
"value": "DEBUG"
}
],
"stopAtEntry": false,
Expand Down Expand Up @@ -963,7 +963,7 @@
},
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "INFO"
"value": "DEBUG"
}
],
"stopAtEntry": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ replayer:
basename: "surgical_video"
frame_rate: 0 # as specified in timestamps
repeat: false # default: false
realtime: true # default: true
realtime: false # default: true
count: 0 # default: 0 (no frame count restriction)

format_converter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ class AsynchronousConditionQueue : public Resource {
if (data_available_condition_->event_state() == AsynchronousEventState::EVENT_WAITING) {
data_available_condition_->event_state(AsynchronousEventState::EVENT_DONE);
}
HOLOSCAN_LOG_DEBUG("Items queued+: {}", queue_.size());
}

DataT pop() {
if (empty()) { return nullptr; }
auto item = queue_.front();
queue_.pop();
HOLOSCAN_LOG_DEBUG("Items queued-: {}", queue_.size());
return item;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ class ConditionVariableQueue : public Resource {
std::lock_guard<std::mutex> lock(response_available_mutex_);
queue_.push(value);
data_available_condition_.notify_one();
HOLOSCAN_LOG_DEBUG("Items queued+: {}", queue_.size());
}

DataT pop() {
std::unique_lock<std::mutex> lock(response_available_mutex_);
data_available_condition_.wait(lock, [this]() { return !queue_.empty(); });
auto item = queue_.front();
queue_.pop();
HOLOSCAN_LOG_DEBUG("Items queued-: {}", queue_.size());
return item;
}

Expand Down

0 comments on commit 03ac79c

Please sign in to comment.