# Path: benchmarks/utils.py
# def log_time(name):
#     def wrapper(func):
#         def run(*args, **kwargs):
#             start = time.time()
#             res = func(*args, **kwargs)
#             print('The execution time of {}: {}'.format(name, time.time() - start))
#             return res
# 
#         return run
# 
#     return wrapper


import random
from queue import PriorityQueue
from heapq import heappush, heappop
from benchmarks.utils import log_time
# coding=utf-8




class ListHeapPriorityQueue:
    def __init__(self):
        self.q = []

    def push(self, item):
        heappush(self.q, item)

    def pop(self):
        return heappop(self.q)



# Path: benchmarks/utils.py
# def log_time(name):
#     def wrapper(func):
#         def run(*args, **kwargs):
#             start = time.time()
#             res = func(*args, **kwargs)
#             print('The execution time of {}: {}'.format(name, time.time() - start))
#             return res
# 
#         return run
# 
#     return wrapper


# Path: benchmarks/priority_queue_benchmark.py
import random
from queue import PriorityQueue
from heapq import heappush, heappop
from benchmarks.utils import log_time

# coding=utf-8




class ListHeapPriorityQueue:
    def __init__(self):
        self.q = []

    def push(self, item):
        heappush(self.q, item)

    def pop(self):
        return heappop(self.q)



@log_time('prepare benchmark data')