Skip to content

Commit

Permalink
Merge pull request #1760 from pupil-labs/pr/1759
Browse files Browse the repository at this point in the history
Enable combination of --hide-ui and --profile flags
  • Loading branch information
Patrick Faion authored Dec 12, 2019
2 parents 165b0e5 + d9c630c commit b72307c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pupil_src/launchables/eye.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,14 +878,15 @@ def eye_profiled(
version,
eye_id,
overwrite_cap_settings=None,
hide_ui=False,
):
import cProfile
import subprocess
import os
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,
Expand All @@ -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),
Expand Down
4 changes: 3 additions & 1 deletion pupil_src/launchables/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,preferred_remote_port,hide_ui)",
{
"timebase": timebase,
"eye_procs_alive": eye_procs_alive,
Expand All @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion pupil_src/launchables/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,14 +756,15 @@ def world_profiled(
user_dir,
version,
preferred_remote_port,
hide_ui,
):
import cProfile
import subprocess
import os
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,
Expand All @@ -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",
Expand Down

0 comments on commit b72307c

Please sign in to comment.