basic statistic collection from traces