-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (31 loc) · 1.29 KB
/
Copy pathmain.py
File metadata and controls
33 lines (31 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from createDatabase import process as createDatabase
from createTables import process as createTables
from tagsPopulator import process as tagsPopulator
from postsPopulator import process as postsPopulator
from tagsRelationGenerator import process as tagsRelationGenerator
from rankGenerator import process as rankGenerator
from config import siteConfig
from faker import Faker
from timer import Timer, displayTimer
def process():
fake = Faker()
timer = Timer()
print("=====================================================")
print("Timer started at : " + timer.get_time_hhmmss())
print("=====================================================")
createDatabase()
createTables()
tagsPopulator()
displayTimer(timer.get_time_hhmmss(), 'Elapsed')
for totalSites in range(siteConfig['siteCount']):
site = fake.pystr(max_chars = 20)
postsPopulator(site)
displayTimer(timer.get_time_hhmmss(), 'Elapsed')
tagsRelationGenerator()
displayTimer(timer.get_time_hhmmss(), 'Elapsed')
print("=====================================================")
print("Mock Database Created")
print("=====================================================")
executionTime = timer.get_time_hhmmss()
displayTimer(timer.get_time_hhmmss(), 'Execution')
process()