mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Merge pull request #509 from topolarity/count-before-after
Add left/right counts to histogram tooltip
This commit is contained in:
commit
2c1b0c6853
@ -1249,15 +1249,19 @@ void View::DrawFindZone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int64_t tBefore = 0;
|
int64_t tBefore = 0;
|
||||||
|
int64_t cntBefore = 0;
|
||||||
for( int i=0; i<bin; i++ )
|
for( int i=0; i<bin; i++ )
|
||||||
{
|
{
|
||||||
tBefore += binTime[i];
|
tBefore += binTime[i];
|
||||||
|
cntBefore += bins[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t tAfter = 0;
|
int64_t tAfter = 0;
|
||||||
|
int64_t cntAfter = 0;
|
||||||
for( int i=bin+1; i<numBins; i++ )
|
for( int i=bin+1; i<numBins; i++ )
|
||||||
{
|
{
|
||||||
tAfter += binTime[i];
|
tAfter += binTime[i];
|
||||||
|
cntAfter += bins[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
@ -1265,6 +1269,8 @@ void View::DrawFindZone()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text( "%s - %s", TimeToString( t0 ), TimeToString( t1 ) );
|
ImGui::Text( "%s - %s", TimeToString( t0 ), TimeToString( t1 ) );
|
||||||
TextFocused( "Count:", RealToString( bins[bin] ) );
|
TextFocused( "Count:", RealToString( bins[bin] ) );
|
||||||
|
TextFocused( "Count in the left bins:", RealToString( cntBefore ) );
|
||||||
|
TextFocused( "Count in the right bins:", RealToString( cntAfter ) );
|
||||||
TextFocused( "Time spent in bin:", TimeToString( binTime[bin] ) );
|
TextFocused( "Time spent in bin:", TimeToString( binTime[bin] ) );
|
||||||
TextFocused( "Time spent in the left bins:", TimeToString( tBefore ) );
|
TextFocused( "Time spent in the left bins:", TimeToString( tBefore ) );
|
||||||
TextFocused( "Time spent in the right bins:", TimeToString( tAfter ) );
|
TextFocused( "Time spent in the right bins:", TimeToString( tAfter ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user