get_metrics function

Compute network metrics