code cleanup

todo:
test metric_statistic
update metric_web trigger related action