message: Add ability to plot event $duration values
diff: @@ -791,6 +791,22 @@ bool GraphPlot::init( TraceEvents &trace_events, const std::string &name,
  const std::vector< uint32_t > *plocs = trace_events.get_tdopexpr_locs( m_filter_str.c_str(), &errstr );
  if ( plocs )
  + {
  + if ( scanf_str == "$duration" )
  + {
  + for ( uint32_t idx : *plocs )
  + {
  + const trace_event_t &event = trace_events.m_events[ idx ];
  +
  + float valf = event.duration * ( 1.0 / NSECS_PER_MSEC );
  +
  + m_minval = std::min< float >( m_minval, valf );
  + m_maxval = std::max< float >( m_maxval, valf );
  +
  + m_plotdata.push_back( { event.ts, event.id, valf } );
  + }
  + }
  + else
  {
  ParsePlotStr parse_plot_str;
  @@ -813,6 +829,7 @@ bool GraphPlot::init( TraceEvents &trace_events, const std::string &name,
  }
  }
  }
  + }
  return !m_plotdata.empty();
  }
  