@@ -1400,15 +1400,26 @@ static char* fxReadNetStringError(int code)
1400
1400
1401
1401
static int fxWriteOkay (FILE * outStream , xsUnsignedValue meterIndex , txMachine * the , char * buf , size_t length )
1402
1402
{
1403
- char fmt [] = ".{\"compute\":%u,\"allocate\":%u,\"allocateChunksCalls\":%u,\"allocateSlotsCalls\":%u,\"garbageCollectionCount\":%u}\1" ;
1403
+ char fmt [] = ("." // OK
1404
+ "{"
1405
+ "\"compute\":%u,"
1406
+ "\"allocate\":%u,"
1407
+ "\"allocateChunksCalls\":%u,"
1408
+ "\"allocateSlotsCalls\":%u,"
1409
+ "\"garbageCollectionCount\":%u,"
1410
+ "\"mapSetAddCount\":%u,"
1411
+ "\"mapSetRemoveCount\":%u}"
1412
+ "\1" // separate meter info from result
1413
+ );
1404
1414
char numeral64 [] = "12345678901234567890" ; // big enough for 64bit numeral
1405
- char prefix [8 + sizeof fmt + 4 * sizeof numeral64 ];
1415
+ char prefix [8 + sizeof fmt + 7 * sizeof numeral64 ];
1406
1416
// TODO: fxCollect counter
1407
1417
// Prepend the meter usage to the reply.
1408
1418
snprintf (prefix , sizeof (prefix ) - 1 , fmt ,
1409
1419
meterIndex , the -> allocatedSpace ,
1410
1420
the -> allocateChunksCallCount , the -> allocateSlotsCallCount ,
1411
- the -> garbageCollectionCount );
1421
+ the -> garbageCollectionCount ,
1422
+ the -> mapSetAddCount , the -> mapSetRemoveCount );
1412
1423
return fxWriteNetString (outStream , prefix , buf , length );
1413
1424
}
1414
1425
0 commit comments