def timeheader(timestamp=time.gmtime()):
"""Timestamp header string
timestamp - timestamp
return - timetamp string for the file header
"""
assert isinstance(timestamp, time.struct_time), 'Unexpected type of timestamp'
# ATTENTION: MPE pool timestamp [prefix] intentionally differs a bit from the
# benchmark timestamp to easily find/filter each of them
return time.strftime('# ----- %Y-%m-%d %H:%M:%S ' + '-'*30, timestamp)
# Limit the amount of memory consumption by worker processes.
# NOTE:
# - requires import of psutils
# - automatically reduced to the RAM size if the specidied limit is larger
评论列表
文章目录