API-cHeatmap¶
- class PyMimircache.profiler.cHeatmap.CHeatmap(**kwargs)¶
heatmap class for plotting heatmaps in C
- static get_breakpoints(reader, time_mode, time_interval=-1, num_of_pixel_of_time_dim=-1, **kwargs)¶
retrieve the breakpoints given time_mode and time_interval or num_of_pixel_of_time_dim, break point breaks the trace into chunks of given time_interval
- Parameters:
reader – reader for reading trace
time_mode – either real time (r) or virtual time (v)
time_interval – the intended time_interval of data chunk
num_of_pixel_of_time_dim – the number of chunks, this is used when it is hard to estimate time_interval, you only need specify one, either num_of_pixel_of_time_dim or time_interval
kwargs – not used now
- Returns:
a numpy list of break points begin with 0, ends with total_num_requests
- heatmap(reader, time_mode, plot_type, algorithm='LRU', time_interval=-1, num_of_pixel_of_time_dim=-1, cache_params=None, **kwargs)¶
This functions provides different types of heatmap plotting
- Parameters:
reader – the reader instance for data input
time_mode – either real time (r) or virtual time (v), real time is wall clock time, it needs the reader containing real time info virtual time is the reference number, aka. the number of requests
plot_type – different types of heatmap, supported heatmaps are listed in the table below
algorithm – cache replacement algorithm (default: LRU)
time_interval – the time interval of each pixel
num_of_pixel_of_time_dim – if don’t want to specify time_interval, you can also specify how many pixels you want
cache_params – params used in cache
kwargs – include num_of_threads, figname, enable_ihr, ema_coef(default: 0.8), info_on_fig
- Returns:
plot_type
required parameters
descriptions
“hr_st_et”
cache_size
hit ratio with regarding to start time (x) and end time (y)
“hr_st_size”
NOT IMPLEMENTED
hit ratio with regarding to start time (x) and size (y)
“avg_rd_st_et”
NOT IMPLEMENTED
average reuse distance with regarding to start time (x) and end time (y)
“rd_distribution”
N/A
reuse distance distribution (y) vs time (x)
“rd_distribution_CDF”
N/A
reuse distance distribution CDF (y) vs time (x)
“future_rd_distribution”
N/A
future reuse distance distribution (y) vs time (x)
“dist_distribution”
N/A
absolute distance distribution (y) vs time (x)
“rt_distribution”
N/A
reuse time distribution (y) vs time (x)
- diff_heatmap(reader, time_mode, plot_type, algorithm1, time_interval=-1, num_of_pixel_of_time_dim=-1, algorithm2='Optimal', cache_params1=None, cache_params2=None, **kwargs)¶
- Parameters:
time_interval
num_of_pixel_of_time_dim
algorithm2
cache_params1
cache_params2
algorithm1
plot_type
time_mode
reader
kwargs – include num_of_process, figname
- Returns: