Better naming
This commit is contained in:
parent
ee32e5385b
commit
7c0fb7dda1
1 changed files with 5 additions and 4 deletions
|
@ -68,18 +68,19 @@ def generate_partial_history(user, t_start):
|
||||||
""" Generate the part of the history resulting from the crawl starting at
|
""" Generate the part of the history resulting from the crawl starting at
|
||||||
the given url.
|
the given url.
|
||||||
"""
|
"""
|
||||||
|
timestamp = t_start
|
||||||
result = []
|
result = []
|
||||||
basis = generate_first_url(user)
|
basis = generate_first_url(user)
|
||||||
result.append((basis, t_start))
|
result.append((basis, timestamp))
|
||||||
t_start += 5* random.weibullvariate(1, 1.5)
|
timestamp += 5* random.weibullvariate(1, 1.5)
|
||||||
queue = Queue()
|
queue = Queue()
|
||||||
crawler = crawl.CrawlingThread(user, basis, queue)
|
crawler = crawl.CrawlingThread(user, basis, queue)
|
||||||
crawler.start()
|
crawler.start()
|
||||||
crawler.join()
|
crawler.join()
|
||||||
urls = queue.get()
|
urls = queue.get()
|
||||||
for url in urls:
|
for url in urls:
|
||||||
t_start += 5* random.weibullvariate(1, 1.5)
|
timestamp += 5* random.weibullvariate(1, 1.5)
|
||||||
result.append((url, t_start)
|
result.append((url, timestamp))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def generate_first_url(user):
|
def generate_first_url(user):
|
||||||
|
|
Loading…
Reference in a new issue