mpepool.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:PyExPool 作者: eXascaleInfolab 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号