mirror of
https://github.com/simon987/fastimagehash.git
synced 2025-12-10 21:18:50 +00:00
Update build
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import timeit
|
||||
import sys
|
||||
|
||||
@@ -6,9 +6,11 @@ IMAGE = sys.argv[1]
|
||||
COUNT = 20
|
||||
SIZE = 8
|
||||
|
||||
|
||||
def print_result(method, time):
|
||||
print("%s_%s,%d" % (IMAGE, method, time / COUNT * 1000000000))
|
||||
|
||||
|
||||
print_result("phash", timeit.timeit(
|
||||
setup="from imagehash import phash \n"
|
||||
"from PIL import Image",
|
||||
@@ -36,4 +38,3 @@ print_result("ahash", timeit.timeit(
|
||||
stmt="average_hash(Image.open('%s'), hash_size=%d)" % (IMAGE, SIZE),
|
||||
number=COUNT
|
||||
))
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ files = (
|
||||
)
|
||||
|
||||
for f in files:
|
||||
out = check_output(["python", "benchmark.py", f])
|
||||
out = check_output(["python3", "benchmark.py", f])
|
||||
print(out.decode(), end="")
|
||||
|
||||
print()
|
||||
|
||||
Reference in New Issue
Block a user