diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2025-09-17 17:52:51 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2025-09-17 17:52:51 -0400 |
| commit | 79dcefa5002f6411e05169a226ae9e3cd1114bd7 (patch) | |
| tree | 64d3c31850a7a0f9a57dcef75f385481fd9d8aef /include | |
| parent | 7c3fe4ea760f4773f0eb1a98ed3ba493a36015e2 (diff) | |
| parent | 601481ed0a8061a372900cfb6761e8de81651339 (diff) | |
| download | dynamic-extension-79dcefa5002f6411e05169a226ae9e3cd1114bd7.tar.gz | |
Merge branch 'new-concurrency' of github.com:dbrumbaugh/dynamic-extension-working into new-concurrency
Diffstat (limited to 'include')
| -rw-r--r-- | include/framework/scheduling/statistics.h | 11 | ||||
| -rw-r--r-- | include/util/types.h | 7 |
2 files changed, 10 insertions, 8 deletions
diff --git a/include/framework/scheduling/statistics.h b/include/framework/scheduling/statistics.h index 34699f1..6d9f9f0 100644 --- a/include/framework/scheduling/statistics.h +++ b/include/framework/scheduling/statistics.h @@ -118,10 +118,9 @@ public: size_t first_query = UINT64_MAX; - /* hard-coded for the moment to only consider queries */ for (auto &job : m_jobs) { if (job.second.type != 1) { - continue; + fprintf(stdout, "%ld %ld %ld %ld\n", job.second.id, job.second.size, job.second.runtime(), job.second.runtime() / (job.second.size)); } if (job.first < first_query) { @@ -152,8 +151,8 @@ public: } - int64_t average_queue_time = total_queue_time / query_cnt; - int64_t average_runtime = total_runtime / query_cnt; + int64_t average_queue_time = (query_cnt) ? total_queue_time / query_cnt : 0; + int64_t average_runtime = (query_cnt) ? total_runtime / query_cnt : 0; /* calculate standard deviations */ int64_t queue_deviation_sum = 0; @@ -168,8 +167,8 @@ public: } - int64_t queue_stddev = std::sqrt(queue_deviation_sum / query_cnt); - int64_t runtime_stddev = std::sqrt(runtime_deviation_sum / query_cnt); + int64_t queue_stddev = (query_cnt) ? std::sqrt(queue_deviation_sum / query_cnt) : 0; + int64_t runtime_stddev = (query_cnt) ? std::sqrt(runtime_deviation_sum / query_cnt) : 0; fprintf(stdout, "Query Count: %ld\tWorst Query: %ld\tFirst Query: %ld\n", query_cnt, worst_query, first_query); diff --git a/include/util/types.h b/include/util/types.h index c10f7ff..88774f5 100644 --- a/include/util/types.h +++ b/include/util/types.h @@ -115,7 +115,7 @@ public: size_t reccnt, ReconstructionType type) { m_tasks.push_back({std::move(shards), target, reccnt, type}); - + total_reccnt += reccnt; } void add_reconstruction(level_index source, level_index target, @@ -130,7 +130,10 @@ public: total_reccnt += reccnt; } - void add_reconstruction(ReconstructionTask task) { m_tasks.push_back(task); } + void add_reconstruction(ReconstructionTask task) { + m_tasks.push_back(task); + total_reccnt += task.reccnt; + } size_t get_total_reccnt() { return total_reccnt; } |