  Let $(X,\mathcal{B},\mu,T)$ be a measure preserving system. We say that a
function $f\in L^2(X,\mu)$ is $\mu$-mean equicontinuous if for any $\epsilon>0$
there is $k\in \mathbb{N}$ and measurable sets ${A_1,A_2,\cdots,A_k}$ with
$\mu\left(\bigcup\limits_{i=1}^k A_i\right)>1-\epsilon$ such that whenever
$x,y\in A_i$ for some $1\leq i\leq k$, one has \[
\limsup_{n\to\infty}\frac{1}{n}\sum_{j=0}^{n-1}|f(T^jx)-f(T^jy)|<\epsilon. \]
Measure complexity with respect to $f$ is also introduced. It is shown that $f$
is an almost periodic function if and only if $f$ is $\mu$-mean equicontinuous
if and only if $\mu$ has bounded complexity with respect to $f$.
  Ferenczi studied measure-theoretic complexity using $\alpha$-names of a
partition and the Hamming distance. He proved that if a measure preserving
system is ergodic, then the complexity function is bounded if and only if the
system has discrete spectrum. We show that this result holds without the
assumption of ergodicity.
