mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 07:22:14 +00:00
Optimise generateSampleData by ~10x
Does remove reversion creation for now...
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
from django.core.management import call_command
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
import time
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Adds sample data to use for testing'
|
||||
can_import_settings = True
|
||||
|
||||
def handle(self, *args, **options):
|
||||
begin = time.time()
|
||||
call_command('generateSampleRIGSData')
|
||||
call_command('generateSampleAssetsData')
|
||||
end = time.time()
|
||||
print(f"Total runtime of the program is {end - begin}")
|
||||
|
||||
Reference in New Issue
Block a user