tweaks/fixes in about://tracing performance data generator (press and hold 'p' in example browser, release 'p' will save the file 'timingsX.json')

This commit is contained in:
Erwin Coumans
2016-12-23 21:56:31 -08:00
parent 0917310521
commit e592290f4c

View File

@@ -200,6 +200,11 @@ struct btTimings
#else
if (startTime>endTime)
{
endTime = startTime;
}
unsigned int startTimeRem1000 = startTime%1000;
unsigned int endTimeRem1000 = endTime%1000;
@@ -238,6 +243,7 @@ struct btTimings
char newname[1024];
static int counter2=0;
sprintf(newname,"%s%d",name,counter2++);
fprintf(gTimingFile,"{\"cat\":\"timing\",\"pid\":1,\"tid\":%d,\"ts\":%" PRIu64 ".%s ,\"ph\":\"B\",\"name\":\"%s\",\"args\":{}},\n",
threadId, startTimeDiv1000,startTimeRem1000Str, newname);