Added mark function for metering.