ngamsPlotDataAccess.py 文件源码

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

项目:ngas 作者: ICRAR 项目源码 文件源码
def plot_success_functions():
    data_dir = "/Users/Chen/data/ngas_logs"
    lru_yd = np.load("{0}/{1}".format(data_dir, 'yd_lru_ingest_correct.npy'))
    lfu_yd = np.load("{0}/{1}".format(data_dir, 'yd_lfu_ingest_correct.npy'))
    liat_yd = np.load("{0}/{1}".format(data_dir, 'yd_liat_ingest_correct.npy'))
    lrud_yd = np.load("{0}/{1}".format(data_dir, 'yd_lrud_ingest_correct.npy'))
    lnr_yd = np.load("{0}/{1}".format(data_dir, 'yd_lnr_ingest_correct.npy'))
    law_yd = np.load("{0}/{1}".format(data_dir, 'yd_law_ingest_correct.npy'))
    #liat_yd_imiat = np.load("{0}/{1}".format(data_dir, 'yd_liat_ingest_max_iat.npy'))
    ax1 = plot_success_function(lru_yd, label='Least Recently Used', show=False)
    #plot_success_function(lru_yd, label='LRU - default on disk', line='--', show=False, init_on_tape=False, ax=ax1)
    plot_success_function(lfu_yd, label='Least Frequently Used', line='--', lcolor='skyblue', show=False, ax=ax1)
    #plot_success_function(lfu_yd, label='LFU - default on disk', lcolor='r', line='--', init_on_tape=False, show=False, ax=ax1)
    plot_success_function(liat_yd, label='Longest Inter-Arrival Time', line=':', lcolor='darkorchid', show=False, ax=ax1)
    plot_success_function(law_yd, label='Largest Age Weight (DMF)', line='-', lcolor='k', show=False, ax=ax1)
    #plot_success_function(liat_yd, label='LIAT - default on disk', lcolor='g', line='--', init_on_tape=False, ax=ax1)
    #plot_success_function(liat_yd_imiat, label='LIAT - ingest max iat', lcolor='g', line='-.', ax=ax1)
    plot_success_function(lnr_yd, label='Longest Next Access (Optimal)', line='--', lcolor='deeppink', show=False, ax=ax1, lw=3.0)
    plot_ws_success_function(lru_yd, ax=ax1, lw=3.0)
    plot_success_function(lrud_yd, label='Longest Reuse Distance', line='-.', lcolor='lime', show=True, ax=ax1, lw=4.0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号