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

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

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

  Args:
    title: Title of the graph
    data: Data to plot. Should contain 'size' and 'fragmentation' 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 'fragmentation' entries.
Data to plot . Should contain ' size ' and ' fragmentation ' entries .
output
Filename to save the result to.
Filename to save the result to .