diff --git a/libavcodec/threadprogress.c b/libavcodec/threadprogress.c
index 62c4fd898b..dcea99cb4c 100644
--- a/libavcodec/threadprogress.c
+++ b/libavcodec/threadprogress.c
@@ -33,6 +33,8 @@ DEFINE_OFFSET_ARRAY(ThreadProgress, thread_progress, init,
 av_cold int ff_thread_progress_init(ThreadProgress *pro, int init_mode)
 {
     atomic_init(&pro->progress, init_mode ? -1 : INT_MAX);
+    atomic_init(&pro->fast_path, 0);
+    atomic_init(&pro->slow_path, 0);
 #if HAVE_THREADS
     if (init_mode)
         return ff_pthread_init(pro, thread_progress_offsets);
@@ -48,6 +50,10 @@ av_cold void ff_thread_progress_destroy(ThreadProgress *pro)
 #else
     pro->init = 0;
 #endif
+    int fast = atomic_load_explicit(&pro->fast_path, memory_order_relaxed);
+    int slow = atomic_load_explicit(&pro->slow_path, memory_order_relaxed);
+    av_log(NULL, AV_LOG_ERROR, "fast path %d, slow path %d, fast rate %f\n",
+           fast, slow, (float)fast/(slow + fast));
 }
 
 void ff_thread_progress_report(ThreadProgress *pro, int n)
@@ -69,11 +75,14 @@ void ff_thread_progress_await(const ThreadProgress *pro_c, int n)
      * as it had at the beginning. */
     ThreadProgress *pro = (ThreadProgress*)pro_c;
 
-    if (atomic_load_explicit(&pro->progress, memory_order_acquire) >= n)
+    if (atomic_load_explicit(&pro->progress, memory_order_acquire) >= n) {
+        atomic_fetch_add_explicit(&pro->fast_path, 1, memory_order_release);
         return;
+    }
 
     ff_mutex_lock(&pro->progress_mutex);
     while (atomic_load_explicit(&pro->progress, memory_order_relaxed) < n)
         ff_cond_wait(&pro->progress_cond, &pro->progress_mutex);
     ff_mutex_unlock(&pro->progress_mutex);
+    atomic_fetch_add_explicit(&pro->slow_path, 1, memory_order_release);
 }
diff --git a/libavcodec/threadprogress.h b/libavcodec/threadprogress.h
index cc3414c2ce..6799ad6cb4 100644
--- a/libavcodec/threadprogress.h
+++ b/libavcodec/threadprogress.h
@@ -42,6 +42,8 @@
  */
 typedef struct ThreadProgress {
     atomic_int progress;
+    atomic_int fast_path;
+    atomic_int slow_path;
     unsigned   init;
     AVMutex progress_mutex;
     AVCond  progress_cond;
