diff --git a/validate/tools/gst-validate-launcher.in b/validate/tools/gst-validate-launcher.in index 7b33149820..a546a15c05 100755 --- a/validate/tools/gst-validate-launcher.in +++ b/validate/tools/gst-validate-launcher.in @@ -66,4 +66,12 @@ def _add_gst_launcher_path(): if "__main__" == __name__: libsdir = _add_gst_launcher_path() from launcher.main import main - exit(main(libsdir)) + run_profile = os.environ.get('GST_VALIDATE_LAUNCHER_PROFILING', False) + if run_profile: + import cProfile + prof = cProfile.Profile() + res = prof.runcall(main, libsdir) + prof.dump_stats('gst-validate-launcher-runstats') + exit(res) + + exit(main(libsdir)) \ No newline at end of file