Closed Minusome closed 2 years ago
In flamescope/app/controllers/heatmap.py:
# global cache offsets_cache = {} offsets_mtimes = {} def _read_offsets(file_path, file_type): # fetch modification timestamp and check cache mtime = getmtime(file_path) if file_path in offsets_cache: if mtime == offsets_mtimes[file_path]: # use cached heatmap return offsets_cache[file_path] if file_type == 'perf': return perf_read_offsets(file_path) elif file_type == 'cpuprofile': return cpuprofile_read_offsets(file_path) elif file_type == 'trace_event': return trace_event_read_offsets(file_path, mtime) elif file_type == 'nflxprofile': return nflxprofile_readoffsets(file_path) else: raise InvalidFileError('Unknown file type.')
offsets_cache and offsets_mtimes are checked but never written to.
offsets_cache
offsets_mtimes
In flamescope/app/controllers/heatmap.py:
offsets_cache
andoffsets_mtimes
are checked but never written to.