Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkotila committed Sep 26, 2023
1 parent 2805b18 commit 50e7842
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 4 additions & 9 deletions src/c++/perf_analyzer/periodic_concurrency_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ PeriodicConcurrencyManager::MakeWorker(
return worker;
};

void
PeriodicConcurrencyManager::MaybeAddConcurrentRequests()
{
if (steps_completed_ * concurrency_range_.step < concurrency_range_.end) {
AddConcurrentRequests(concurrency_range_.step);
}
}

void
PeriodicConcurrencyManager::AddConcurrentRequests(
uint64_t num_concurrent_requests)
Expand Down Expand Up @@ -89,7 +81,10 @@ PeriodicConcurrencyManager::PeriodCompletedCallback()
num_incomplete_periods_--;
if (num_incomplete_periods_ == 0) {
steps_completed_++;
MaybeAddConcurrentRequests();
uint64_t num_requests_sent{steps_completed_ * concurrency_range_.step};
if (num_requests_sent < concurrency_range_.end) {
AddConcurrentRequests(concurrency_range_.step);
}
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/c++/perf_analyzer/periodic_concurrency_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ class PeriodicConcurrencyManager : public ConcurrencyManager {
std::shared_ptr<PeriodicConcurrencyWorker::ThreadConfig> thread_config)
override;

void MaybeAddConcurrentRequests();

void AddConcurrentRequests(uint64_t num_concurrent_requests);

void AddConcurrentRequest(size_t seq_stat_index_offset);
Expand Down

0 comments on commit 50e7842

Please sign in to comment.