dbworkload 0.8.4__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dbworkload-0.8.4 → dbworkload-0.9.0}/PKG-INFO +1 -1
- {dbworkload-0.8.4 → dbworkload-0.9.0}/dbworkload/cli/main.py +4 -1
- {dbworkload-0.8.4 → dbworkload-0.9.0}/dbworkload/models/run.py +7 -5
- {dbworkload-0.8.4 → dbworkload-0.9.0}/pyproject.toml +1 -1
- {dbworkload-0.8.4 → dbworkload-0.9.0}/LICENSE +0 -0
- {dbworkload-0.8.4 → dbworkload-0.9.0}/README.md +0 -0
- {dbworkload-0.8.4 → dbworkload-0.9.0}/dbworkload/__init__.py +0 -0
- {dbworkload-0.8.4 → dbworkload-0.9.0}/dbworkload/cli/dep.py +0 -0
- {dbworkload-0.8.4 → dbworkload-0.9.0}/dbworkload/cli/util.py +0 -0
- {dbworkload-0.8.4 → dbworkload-0.9.0}/dbworkload/models/util.py +0 -0
- {dbworkload-0.8.4 → dbworkload-0.9.0}/dbworkload/templates/stub.j2 +0 -0
- {dbworkload-0.8.4 → dbworkload-0.9.0}/dbworkload/utils/common.py +0 -0
- {dbworkload-0.8.4 → dbworkload-0.9.0}/dbworkload/utils/simplefaker.py +0 -0
|
@@ -16,7 +16,6 @@ import yaml
|
|
|
16
16
|
|
|
17
17
|
import dbworkload.cli.util
|
|
18
18
|
import dbworkload.models.run
|
|
19
|
-
import dbworkload.models.util
|
|
20
19
|
import dbworkload.utils.common
|
|
21
20
|
from dbworkload.cli.dep import EPILOG, ConnInfo, Param
|
|
22
21
|
|
|
@@ -153,6 +152,9 @@ def run(
|
|
|
153
152
|
"--bins",
|
|
154
153
|
help="comma separated list of ints defining the histogram bins.",
|
|
155
154
|
),
|
|
155
|
+
delay_stats: int = typer.Option(
|
|
156
|
+
0, "--delay-stats", help="Start collecting stats after the speciied seconds."
|
|
157
|
+
),
|
|
156
158
|
log_level: LogLevel = Param.LogLevel,
|
|
157
159
|
):
|
|
158
160
|
logger.setLevel(log_level.upper())
|
|
@@ -259,6 +261,7 @@ def run(
|
|
|
259
261
|
save,
|
|
260
262
|
schedule,
|
|
261
263
|
histogram_bins,
|
|
264
|
+
delay_stats,
|
|
262
265
|
log_level.upper(),
|
|
263
266
|
)
|
|
264
267
|
|
|
@@ -189,6 +189,7 @@ def run(
|
|
|
189
189
|
save: bool,
|
|
190
190
|
schedule: list,
|
|
191
191
|
histogram_bins: list,
|
|
192
|
+
delay_stats: int,
|
|
192
193
|
log_level: str,
|
|
193
194
|
):
|
|
194
195
|
def gracefully_shutdown(by_keyinterrupt: bool = False):
|
|
@@ -228,7 +229,7 @@ def run(
|
|
|
228
229
|
# break
|
|
229
230
|
|
|
230
231
|
# now that we have all stat reports, calculate the stats one last time.
|
|
231
|
-
report = stats.calculate_stats(active_connections, end_time)
|
|
232
|
+
report = stats.calculate_stats(active_connections, end_time - delay_stats)
|
|
232
233
|
centroids = stats.get_centroids()
|
|
233
234
|
|
|
234
235
|
if save:
|
|
@@ -250,7 +251,7 @@ def run(
|
|
|
250
251
|
|
|
251
252
|
# the final stat report summarizes the entire test run
|
|
252
253
|
final_stats_report = tabulate.tabulate(
|
|
253
|
-
stats.calculate_final_stats(active_connections,
|
|
254
|
+
stats.calculate_final_stats(active_connections, stats.endtime),
|
|
254
255
|
FINAL_HEADERS,
|
|
255
256
|
tablefmt="simple_outline",
|
|
256
257
|
intfmt=",",
|
|
@@ -268,6 +269,7 @@ def run(
|
|
|
268
269
|
["iterations", iterations],
|
|
269
270
|
["ramp", ramp],
|
|
270
271
|
["args", args],
|
|
272
|
+
["delay_stats", delay_stats],
|
|
271
273
|
],
|
|
272
274
|
headers=["Parameter", "Value"],
|
|
273
275
|
)
|
|
@@ -388,7 +390,7 @@ def run(
|
|
|
388
390
|
# report time happens STATS_BUFFER seconds after the stats are received.
|
|
389
391
|
# we add this buffer to make sure we get all the stats reports
|
|
390
392
|
# from each thread before we aggregate and display
|
|
391
|
-
report_time = start_time + FREQUENCY + STATS_BUFFER
|
|
393
|
+
report_time = start_time + FREQUENCY + STATS_BUFFER + delay_stats
|
|
392
394
|
|
|
393
395
|
returned_procs = 0
|
|
394
396
|
active_connections = 0
|
|
@@ -427,7 +429,7 @@ def run(
|
|
|
427
429
|
ramp_time = dur
|
|
428
430
|
|
|
429
431
|
logger.info(
|
|
430
|
-
f"Starting schedule {i+1}/{len(schedule)}: cc=
|
|
432
|
+
f"Starting schedule {i+1}/{len(schedule)}: {cc=}, {max_rate=}, {ramp_time=}, {dur=}"
|
|
431
433
|
)
|
|
432
434
|
|
|
433
435
|
# always make sure that a duration is specified, even if none was passed
|
|
@@ -521,7 +523,7 @@ def run(
|
|
|
521
523
|
)
|
|
522
524
|
|
|
523
525
|
# remove the STATS_BUFFER seconds added
|
|
524
|
-
endtime = int(time.time()) - STATS_BUFFER
|
|
526
|
+
endtime = int(time.time() - delay_stats) - STATS_BUFFER
|
|
525
527
|
|
|
526
528
|
report = stats.calculate_stats(active_connections, endtime)
|
|
527
529
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|