Unified framework for performance analysis of Bayesian inference