Fix url completion benchmark.
Still had old code from pre-SQL era.
This commit is contained in:
parent
39b561a182
commit
2c501f7fb7
@ -580,21 +580,21 @@ def test_url_completion_benchmark(benchmark, config_stub,
|
|||||||
config_stub.data['completion'] = {'timestamp-format': '%Y-%m-%d',
|
config_stub.data['completion'] = {'timestamp-format': '%Y-%m-%d',
|
||||||
'web-history-max-items': 1000}
|
'web-history-max-items': 1000}
|
||||||
|
|
||||||
entries = [history.Entry(
|
entries = [web_history_stub.Entry(
|
||||||
atime=i,
|
atime=i,
|
||||||
url=QUrl('http://example.com/{}'.format(i)),
|
url='http://example.com/{}'.format(i),
|
||||||
title='title{}'.format(i))
|
title='title{}'.format(i),
|
||||||
|
redirect=False)
|
||||||
for i in range(100000)]
|
for i in range(100000)]
|
||||||
|
|
||||||
web_history_stub.history_dict = collections.OrderedDict(
|
web_history_stub.insert_batch(entries)
|
||||||
((e.url_str(), e) for e in entries))
|
|
||||||
|
|
||||||
quickmark_manager_stub.marks = collections.OrderedDict(
|
quickmark_manager_stub.marks = collections.OrderedDict(
|
||||||
(e.title, e.url_str())
|
(e.title, e.url)
|
||||||
for e in entries[0:1000])
|
for e in entries[0:1000])
|
||||||
|
|
||||||
bookmark_manager_stub.marks = collections.OrderedDict(
|
bookmark_manager_stub.marks = collections.OrderedDict(
|
||||||
(e.url_str(), e.title)
|
(e.url, e.title)
|
||||||
for e in entries[0:1000])
|
for e in entries[0:1000])
|
||||||
|
|
||||||
def bench():
|
def bench():
|
||||||
|
Loading…
Reference in New Issue
Block a user