It's pretty well known that the Ky Fan metric induces the topology of *convergence in measure* (or *convergence in probability*). (Of course it should be regarded as a metric / topology on the space $L^0(P)$ of equivalence classes of random variables, mod $P$-almost sure equality.)

In V. Bogachev's book *Measure Theory*, Exercise 4.7.129 is as follows:

**4.7.129.** (Fréchet [316], Veress [974]) Let $\mu$ be a probability measure on a
space $X$ and let $M$ be some set of $\mu$-measurable functions. Prove the equivalence
of the following conditions:

the set $M$ has compact closure in the metric of convergence in measure
(Exercise 4.7.60);

every sequence in $M$ contains an a.e. convergent subsequence;

for every $\varepsilon > 0$ and $\alpha > 0$, there exists a finite collection of measurable
functions $\psi_n, \dots, \psi_n$ such that, for every function $f \in M$, one can find an index
$i \le n$ with $\mu(x \colon |f(x) - \psi_i(x)| \ge \varepsilon) < \alpha$;

for every $\varepsilon > 0$, there exist a number $C > 0$ and a finite partition of the
space into disjoint measurable parts $E_1, \dots, E_n$ such that, for every function $f \in M$,
there exists a measurable set $E_f$ with the following properties:
$$\mu(E_f) < \varepsilon, \quad \sup_{x \in X \setminus E_f} |f(x)| < C, \quad \sup_{x,y \in E_i \setminus E_f} |f(x) - f(y)| < \varepsilon$$
for all $f \in M$ and $i = 1,\dots ,n$.

Hint: see Dunford, Schwartz [256, Theorem IV.11.1].

The relevant references are:

[256] Dunford N., Schwartz J.T. Linear operators, I. General Theory. Interscience, New
York, 1958; xiv+858 pp.

[316] Fréchet M. Sur les ensembles compacts de fonctions mesurables. Fund. Math. 1927.
V. 9. P. 25–32.

[974] Veress P. Uber
Funktionenmengen. Acta Sci. Math. Szeged. 1927. V. 3. P. 177–192.