mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add plot type "power" and Watt format.
Note that this technically breaks backwards compatibility of trace files for 0.9.2 builds. But, whatever, as it's not yet released.
This commit is contained in:
@@ -157,6 +157,8 @@ uint32_t GetPlotColor( const PlotData& plot, const Worker& worker )
|
||||
return 0xFF2266CC;
|
||||
case PlotType::SysTime:
|
||||
return 0xFFBAB220;
|
||||
case PlotType::Power:
|
||||
return 0xFF33CC33;
|
||||
default:
|
||||
assert( false );
|
||||
return 0;
|
||||
@@ -177,6 +179,9 @@ const char* FormatPlotValue( double val, PlotValueFormatting format )
|
||||
case PlotValueFormatting::Percentage:
|
||||
sprintf( buf, "%.2f%%", val );
|
||||
break;
|
||||
case PlotValueFormatting::Watt:
|
||||
sprintf( buf, "%s W", RealToString( val ) );
|
||||
break;
|
||||
default:
|
||||
assert( false );
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user