refactor, 将单个component的parallelism计算抽取出来