tools/memory/partition_allocator/trace_utils.py
def PlotProcessWaste(title, data, output):
  """Plots the Unused memory vs size for a single process.

  Args:
    title: Title of the graph
    data: Data to plot. Should contain 'size' and 'unused' entries.
    output: Filename to save the result to.
  """
  plt.figure(figsize=(16, 8))
  plt.title(title)
  plt.xscale('log', base=2)
  plt.yscale('log', base=2)
  plt.stem(data['data']['size'][data['data']['unused'] != 0],
           data['data']['unused'][data['data']['unused'] != 0])
  plt.ylim(ymin=1, ymax=2**20)
  plt.xlabel('Size (log)')
  plt.ylabel('Unused Size (log)')
  plt.savefig(output, bbox_inches='tight')
  plt.close()
Plots the Unused memory vs size for a single process.

  Args:
    title: Title of the graph
    data: Data to plot. Should contain 'size' and 'unused' entries.
    output: Filename to save the result to.
  
Plots the Unused memory vs size for a single process.
Plots the Unused memory vs size for a single process .
def PlotProcessWaste(title, data, output):
  plt.figure(figsize=(16, 8))
  plt.title(title)
  plt.xscale('log', base=2)
  plt.yscale('log', base=2)
  plt.stem(data['data']['size'][data['data']['unused'] != 0],
           data['data']['unused'][data['data']['unused'] != 0])
  plt.ylim(ymin=1, ymax=2**20)
  plt.xlabel('Size (log)')
  plt.ylabel('Unused Size (log)')
  plt.savefig(output, bbox_inches='tight')
  plt.close()
def PlotProcessWaste ( title , data , output ) : plt . figure ( figsize = ( 16 , 8 ) ) plt . title ( title ) plt . xscale ( 'log' , base = 2 ) plt . yscale ( 'log' , base = 2 ) plt . stem ( data [ 'data' ] [ 'size' ] [ data [ 'data' ] [ 'unused' ] != 0 ] , data [ 'data' ] [ 'unused' ] [ data [ 'data' ] [ 'unused' ] != 0 ] ) plt . ylim ( ymin = 1 , ymax = 2 ** 20 ) plt . xlabel ( 'Size (log)' ) plt . ylabel ( 'Unused Size (log)' ) plt . savefig ( output , bbox_inches = 'tight' ) plt . close ( )
Plots the Unused memory vs size for a single process.
Plots the Unused memory vs size for a single process .
"""Plots the Unused memory vs size for a single process.

  Args:
    title: Title of the graph
    data: Data to plot. Should contain 'size' and 'unused' entries.
    output: Filename to save the result to.
  """
title
Title of the graph
Title of the graph
data
Data to plot. Should contain 'size' and 'unused' entries.
Data to plot . Should contain ' size ' and ' unused ' entries .
output
Filename to save the result to.
Filename to save the result to .