From 3397199de2efc256d2d671e0a2fa14bde305fe5b Mon Sep 17 00:00:00 2001 From: basile Date: Wed, 11 Dec 2019 14:58:01 -0500 Subject: [PATCH 1/4] fix profiling broken by PR #1712 --- pupil_src/launchables/eye.py | 2 ++ pupil_src/launchables/world.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pupil_src/launchables/eye.py b/pupil_src/launchables/eye.py index 8091f31ba6..e6b6740b7c 100644 --- a/pupil_src/launchables/eye.py +++ b/pupil_src/launchables/eye.py @@ -878,6 +878,7 @@ def eye_profiled( version, eye_id, overwrite_cap_settings=None, + hide_ui=False, ): import cProfile import subprocess @@ -896,6 +897,7 @@ def eye_profiled( "version": version, "eye_id": eye_id, "overwrite_cap_settings": overwrite_cap_settings, + "hide_ui": hide_ui, }, locals(), "eye{}.pstats".format(eye_id), diff --git a/pupil_src/launchables/world.py b/pupil_src/launchables/world.py index 3650577e1b..ba3a5c1ccc 100644 --- a/pupil_src/launchables/world.py +++ b/pupil_src/launchables/world.py @@ -756,6 +756,7 @@ def world_profiled( user_dir, version, preferred_remote_port, + hide_ui, ): import cProfile import subprocess @@ -773,6 +774,7 @@ def world_profiled( "user_dir": user_dir, "version": version, "preferred_remote_port": preferred_remote_port, + "hide_ui": hide_ui, }, locals(), "world.pstats", From 5f4c81daad08a953b171a052553a5c1a502a0ba1 Mon Sep 17 00:00:00 2001 From: basile Date: Wed, 11 Dec 2019 15:02:21 -0500 Subject: [PATCH 2/4] forgot to update the call --- pupil_src/launchables/eye.py | 2 +- pupil_src/launchables/world.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pupil_src/launchables/eye.py b/pupil_src/launchables/eye.py index e6b6740b7c..df333d623f 100644 --- a/pupil_src/launchables/eye.py +++ b/pupil_src/launchables/eye.py @@ -886,7 +886,7 @@ def eye_profiled( from .eye import eye cProfile.runctx( - "eye(timebase, is_alive_flag,ipc_pub_url,ipc_sub_url,ipc_push_url, user_dir, version, eye_id, overwrite_cap_settings)", + "eye(timebase, is_alive_flag,ipc_pub_url,ipc_sub_url,ipc_push_url, user_dir, version, eye_id, overwrite_cap_settings, hide_ui)", { "timebase": timebase, "is_alive_flag": is_alive_flag, diff --git a/pupil_src/launchables/world.py b/pupil_src/launchables/world.py index ba3a5c1ccc..a98dd08f86 100644 --- a/pupil_src/launchables/world.py +++ b/pupil_src/launchables/world.py @@ -764,7 +764,7 @@ def world_profiled( from .world import world cProfile.runctx( - "world(timebase, eye_procs_alive, ipc_pub_url,ipc_sub_url,ipc_push_url,user_dir,version,preferred_remote_port)", + "world(timebase, eye_procs_alive, ipc_pub_url,ipc_sub_url,ipc_push_url,user_dir,version,preferred_remote_port, hide_ui)", { "timebase": timebase, "eye_procs_alive": eye_procs_alive, From 6274c54e9ca2139a4abbf166a156e7aad8e7e1f1 Mon Sep 17 00:00:00 2001 From: Patrick Faion Date: Thu, 12 Dec 2019 10:56:20 +0100 Subject: [PATCH 3/4] Add hide_ui flag to service_profiled --- pupil_src/launchables/service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pupil_src/launchables/service.py b/pupil_src/launchables/service.py index ea2b228bf7..93cecabb64 100644 --- a/pupil_src/launchables/service.py +++ b/pupil_src/launchables/service.py @@ -334,12 +334,13 @@ def service_profiled( user_dir, version, preferred_remote_port, + hide_ui, ): import cProfile, subprocess, os from .service import service cProfile.runctx( - "service(timebase,eye_procs_alive,ipc_pub_url,ipc_sub_url,ipc_push_url,user_dir,version)", + "service(timebase,eye_procs_alive,ipc_pub_url,ipc_sub_url,ipc_push_url,user_dir,version,hide_ui)", { "timebase": timebase, "eye_procs_alive": eye_procs_alive, @@ -349,6 +350,7 @@ def service_profiled( "user_dir": user_dir, "version": version, "preferred_remote_port": preferred_remote_port, + "hide_ui": hide_ui, }, locals(), "service.pstats", From d9c630c29d76ccb46936ba7c621e9193a6e10a49 Mon Sep 17 00:00:00 2001 From: Patrick Faion Date: Thu, 12 Dec 2019 10:56:47 +0100 Subject: [PATCH 4/4] Fix missing parameter in service_profiled --- pupil_src/launchables/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pupil_src/launchables/service.py b/pupil_src/launchables/service.py index 93cecabb64..8d320ab7f2 100644 --- a/pupil_src/launchables/service.py +++ b/pupil_src/launchables/service.py @@ -340,7 +340,7 @@ def service_profiled( from .service import service cProfile.runctx( - "service(timebase,eye_procs_alive,ipc_pub_url,ipc_sub_url,ipc_push_url,user_dir,version,hide_ui)", + "service(timebase,eye_procs_alive,ipc_pub_url,ipc_sub_url,ipc_push_url,user_dir,version,preferred_remote_port,hide_ui)", { "timebase": timebase, "eye_procs_alive": eye_procs_alive,