XMPro provides a convenient Function that can be used to achieve this easily in a Data Stream. Details for an example and its configuration can be found in the How to Use section.
Pre-requisites
Due to the nature of AUC calculation, it is only possible to calculate AUC for a batch or a set of points. Hence it is important to configure the data stream in a way that AUC function receives a batch of data versus a single event at a time.