P4C
The P4 Compiler
Loading...
Searching...
No Matches
PHV::v2::AllocatorMetrics Class Reference

AllocatorMetrics contains metrics useful in tracking Allocator efficiency and debug. More...

#include <allocator_metrics.h>

Public Types

enum  ctype { ALLOC = 0 , EQUIV = 1 }
 

Public Member Functions

 AllocatorMetrics (cstring name=""_cs)
 
void clear ()
 
unsigned long get_containers (const ctype ct=ALLOC, const PHV::Kind *kind=nullptr, const PHV::Size *size=nullptr, bool succ=false) const
 
std::string get_duration () const
 
cstring get_name () const
 
void start_clock ()
 
void stop_clock ()
 
void update_container_equivalence_metrics (const PHV::Container &c)
 
void update_containers_metrics (const PHV::Container &c, bool succ=false)
 

Detailed Description

AllocatorMetrics contains metrics useful in tracking Allocator efficiency and debug.