tweaking flush and adding a new event emit for request

 to help with API performance measurement