diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2025-10-29 11:50:51 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2025-10-29 11:50:51 -0400 |
| commit | fbe7dcdce1f7c81248c7086cac5d3f6a375b0c42 (patch) | |
| tree | cfd9f89d77927afb85839b91c761d3c5fe37eee1 /include/framework/DynamicExtension.h | |
| parent | cf5f3bbb0cb58430ed68ad3ebfcefc009e553d71 (diff) | |
| download | dynamic-extension-fbe7dcdce1f7c81248c7086cac5d3f6a375b0c42.tar.gz | |
Updates for dynamic rate limitingnew-concurrency
Diffstat (limited to 'include/framework/DynamicExtension.h')
| -rw-r--r-- | include/framework/DynamicExtension.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/framework/DynamicExtension.h b/include/framework/DynamicExtension.h index 63264a0..c062d4a 100644 --- a/include/framework/DynamicExtension.h +++ b/include/framework/DynamicExtension.h @@ -10,6 +10,7 @@ #pragma once #include <atomic> +#include <chrono> #include <cstdio> #include <gsl/gsl_rng.h> #include <mutex> @@ -544,7 +545,13 @@ private: reconstruction_results<ShardType> flush_recon; flush_recon.target_level = 0; + auto start = std::chrono::high_resolution_clock::now(); flush_recon.new_shard = std::make_shared<ShardType>(std::move(buffview)); + auto stop = std::chrono::high_resolution_clock::now(); + flush_recon.runtime = + std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start) + .count(); + flush_recon.reccnt = flush_recon.new_shard->get_record_count(); reconstructions.push_back(flush_recon); @@ -637,6 +644,13 @@ private: /* apply our updates to the copied structure (adding/removing shards) */ for (auto recon : reconstructions) { + if (recon.target_level != 0) { + #ifdef DE_PRINT_MODEL_OUTPUT + fprintf(stdout, "M\t%ld\t%ld\t%ld\t%ld\n", recon.target_level, + args->predicted_runtime, recon.runtime, recon.reccnt); + #endif + } + auto grow = args->version->get_mutable_structure()->apply_reconstruction( recon, args->version->get_id()); if (grow) { |