Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F11023659
D4919.id17504.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
920 B
Subscribers
None
D4919.id17504.diff
View Options
diff --git a/swh/scheduler/cli/simulator.py b/swh/scheduler/cli/simulator.py
--- a/swh/scheduler/cli/simulator.py
+++ b/swh/scheduler/cli/simulator.py
@@ -17,14 +17,21 @@
@simulator.command("fill-test-data")
+@click.option(
+ "--num-origins",
+ "-n",
+ type=int,
+ default=100000,
+ help="Number of listed origins to add",
+)
@click.pass_context
-def fill_test_data_command(ctx):
+def fill_test_data_command(ctx, num_origins):
"""Fill the scheduler with test data for simulation purposes."""
from swh.scheduler.simulator import fill_test_data
- click.echo("Filling test data...")
+ click.echo(f"Filling {num_origins:,} listed origins data...")
start = time.monotonic()
- fill_test_data(ctx.obj["scheduler"])
+ fill_test_data(ctx.obj["scheduler"], num_origins=num_origins)
runtime = time.monotonic() - start
click.echo(f"Completed in {runtime:.2f} seconds")
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 17, 4:55 PM (1 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217734
Attached To
D4919: Add a --num-origins option to the fill-test-data cli command
Event Timeline
Log In to Comment