diff --git a/Code/Framework/AzCore/Platform/Common/azcore_profile_telemetry_files.cmake b/Code/Framework/AzCore/Platform/Common/azcore_profile_telemetry_files.cmake deleted file mode 100644 index d23f8df790..0000000000 --- a/Code/Framework/AzCore/Platform/Common/azcore_profile_telemetry_files.cmake +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - RadTelemetry/ProfileTelemetry.h - RadTelemetry/ProfileTelemetryBus.h -) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp index 841607404a..f07262f2ca 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp @@ -31,7 +31,7 @@ #include #endif -//Enables more inner-loop profiling scopes (can create high overhead in RadTelemetry if there are many-many objects in a scene) +//Enables more inner-loop profiling scopes (can create high overhead in telemetry if there are many-many objects in a scene) //#define AZ_CULL_PROFILE_DETAILED //Enables more detailed profiling descriptions within the culling system, but adds some performance overhead. diff --git a/Tools/LyTestTools/ly_test_tools/report/rad_telemetry.py b/Tools/LyTestTools/ly_test_tools/report/rad_telemetry.py deleted file mode 100755 index 865cc4671c..0000000000 --- a/Tools/LyTestTools/ly_test_tools/report/rad_telemetry.py +++ /dev/null @@ -1,98 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT - -Helpers for RAD Telemetry, currently only for Windows -""" - -import logging -import subprocess -import os - -import ly_test_tools.environment.process_utils as process_utils -from ly_test_tools import WINDOWS - -_RAD_DEFAULT_PORT = 4719 - -_CREATE_NEW_PROCESS_GROUP = 0x00000200 -_DETACHED_PROCESS = 0x00000008 -_WINDOWS_FLAGS = _CREATE_NEW_PROCESS_GROUP | _DETACHED_PROCESS - -RAD_TOOLS_SUBPATH = os.path.join("dev", "Gems", "RADTelemetry", "Tools") - -log = logging.getLogger(__name__) - - -def __set_firewall_rule(direction, port): - """ - Adds a Windows firewall rule if one does not yet exist. Requires administrator privilege. - - :param direction: Must be 'in' or 'out' - :param port: target port to open - :return: None - """ - - assert WINDOWS, "Only implemented for Windows platforms" - log.info(f"Setting firewall rule on port '{port}' for direction '{direction}'") - - show_rule = ['netsh', 'advfirewall', 'firewall', 'show', 'rule', 'name=RADTelemetry', f'dir={direction}'] - show_result = process_utils.safe_check_call(show_rule) - - if show_result == 0: - log.debug("Rule already exists") - else: - add_rule = ['netsh', 'advfirewall', 'firewall', 'add', 'rule', 'name=RADTelemetry', f'dir={direction}', - 'action=allow', 'protocol=TCP', f'localport={port}'] - process_utils.check_call(add_rule) - log.debug("Added new rule") - - -def set_firewall_rules(): - """ - Opens firewall ports necessary for a remote device to communicate with the RAD Telemetry server. - Requires administrator privilege. - - :return: None - """ - assert WINDOWS, "Only implemented for Windows platforms" - __set_firewall_rule(direction="in", port=_RAD_DEFAULT_PORT) - __set_firewall_rule(direction="out", port=_RAD_DEFAULT_PORT) - - -def launch_server(dev_path): - """ - Launches the RAD Telemetry server to collect telemetry captures. - - :param dev_path: path to the folder containing engineroot.txt - :return: None - """ - assert WINDOWS, "Only implemented for Windows platforms" - server_path = os.path.join(dev_path, RAD_TOOLS_SUBPATH, "tm_server.exe") - subprocess.Popen([server_path], creationflags=_WINDOWS_FLAGS, close_fds=True) - log.info(f"Launched RAD Server from {server_path}") - - -def terminate_servers(dev_path): - """ - Terminate the RAD Telemetry server and all related tools, important before collecting any of its captures - - :param dev_path: path to the folder containing engineroot.txt - :return: None - """ - assert WINDOWS, "Only implemented for Windows platforms" - rad_path = os.path.join(dev_path, RAD_TOOLS_SUBPATH) - process_utils.kill_processes_started_from(rad_path) - - -def get_capture_path(dev_path): - """ - Returns the path of the tm_server.exe file - - :return: path to the folder containing output for local servers - """ - assert WINDOWS, "Only implemented for Windows platforms" - get_folder_path = os.path.join(dev_path, RAD_TOOLS_SUBPATH, "tm_server.exe") - output = process_utils.check_output([get_folder_path]) - return output.strip() diff --git a/Tools/LyTestTools/tests/unit/test_rad_telemetry.py b/Tools/LyTestTools/tests/unit/test_rad_telemetry.py deleted file mode 100755 index 76db056215..0000000000 --- a/Tools/LyTestTools/tests/unit/test_rad_telemetry.py +++ /dev/null @@ -1,88 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT - -Unit Tests for ~/ly_test_tools/report/rad_telemetry.py -""" - -import unittest.mock as mock -import os -import pytest - -import ly_test_tools.report.rad_telemetry -from ly_test_tools import WINDOWS - -pytestmark = pytest.mark.SUITE_smoke - - -_RAD_DEFAULT_PORT = 4719 - -_CREATE_NEW_PROCESS_GROUP = 0x00000200 -_DETACHED_PROCESS = 0x00000008 -_WINDOWS_FLAGS = _CREATE_NEW_PROCESS_GROUP | _DETACHED_PROCESS - -RAD_TOOLS_SUBPATH = os.path.join("dev", "Gems", "RADTelemetry", "Tools") - - -@pytest.mark.skipif( - not WINDOWS, - reason="tests.unit.test_rad_telemetry is restricted to the Windows platform.") -class TestRADTelemetry: - - @mock.patch('ly_test_tools.environment.process_utils.check_call') - @mock.patch('ly_test_tools.environment.process_utils.safe_check_call') - def test_SetFirewallRules_ShowRuleResultNotZero_CallsAddRule(self, mock_safe_call, mock_call): - ly_test_tools.report.rad_telemetry.set_firewall_rules() - - mock_safe_call.call_args_list = [ - mock.call(['netsh', 'advfirewall', 'firewall', 'show', 'rule', 'name=RADTelemetry', 'dir=in']), - mock.call(['netsh', 'advfirewall', 'firewall', 'show', 'rule', 'name=RADTelemetry', 'dir=out']), - ] - mock_call.call_args_list = [ - mock.call( - ['netsh', 'advfirewall', 'firewall', 'add', 'rule', 'name=RADTelemetry', 'dir=in', - 'action=allow', 'protocol=TCP', 'localport={}'.format(_RAD_DEFAULT_PORT)]), - mock.call( - ['netsh', 'advfirewall', 'firewall', 'add', 'rule', 'name=RADTelemetry', 'dir=out', - 'action=allow', 'protocol=TCP', 'localport={}'.format(_RAD_DEFAULT_PORT)]), - ] - - assert mock_call.call_count == 2 - assert mock_safe_call.call_count == 2 - - @mock.patch('ly_test_tools.environment.process_utils.check_call') - @mock.patch('ly_test_tools.environment.process_utils.safe_check_call') - def test_SetFirewallRules_ShowRuleResultEqualsZero_AddRuleNotCalled(self, mock_safe_call, mock_call): - mock_safe_call.return_value = 0 - ly_test_tools.report.rad_telemetry.set_firewall_rules() - - mock_call.assert_not_called() - assert mock_safe_call.call_count == 2 - - @mock.patch('subprocess.Popen') - def test_LaunchServer_ValidDevPath_PopenSuccess(self, mock_popen): - mock_server_path = os.path.join('dev_path', RAD_TOOLS_SUBPATH, "tm_server.exe") - - ly_test_tools.report.rad_telemetry.launch_server('dev_path') - - mock_popen.assert_called_once_with([mock_server_path], creationflags=_WINDOWS_FLAGS, close_fds=True) - - @mock.patch('ly_test_tools.environment.process_utils.kill_processes_started_from') - def test_TerminateServer_ValidDevPath_KillsRADProcess(self, mock_kill_process): - mock_rad_path = os.path.join('dev_path', RAD_TOOLS_SUBPATH) - - ly_test_tools.report.rad_telemetry.terminate_servers('dev_path') - - mock_kill_process.assert_called_once_with(mock_rad_path) - - @mock.patch('ly_test_tools.environment.process_utils.check_output') - def test_TerminateServer_ValidDevPath_KillsRADProcess(self, mock_call): - mock_get_folder_path = os.path.join('dev_path', RAD_TOOLS_SUBPATH, "tm_server.exe") - mock_call.return_value = 'test' - - under_test = ly_test_tools.report.rad_telemetry.get_capture_path('dev_path') - - mock_call.assert_called_once_with([mock_get_folder_path]) - assert under_test == 'test' diff --git a/cmake/3rdParty/FindRadTelemetry.cmake b/cmake/3rdParty/FindRadTelemetry.cmake deleted file mode 100644 index 4af7423526..0000000000 --- a/cmake/3rdParty/FindRadTelemetry.cmake +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -ly_add_external_target( - NAME RadTelemetry - 3RDPARTY_ROOT_DIRECTORY "${LY_RAD_TELEMETRY_INSTALL_ROOT}" - VERSION 3.5.0.17 - INCLUDE_DIRECTORIES Include -) diff --git a/cmake/3rdParty/Platform/iOS/cmake_ios_files.cmake b/cmake/3rdParty/Platform/iOS/cmake_ios_files.cmake index dc02644f5b..10e3ad7ec2 100644 --- a/cmake/3rdParty/Platform/iOS/cmake_ios_files.cmake +++ b/cmake/3rdParty/Platform/iOS/cmake_ios_files.cmake @@ -8,6 +8,5 @@ set(FILES BuiltInPackages_ios.cmake - RadTelemetry_ios.cmake Wwise_ios.cmake ) diff --git a/cmake/3rdParty/cmake_files.cmake b/cmake/3rdParty/cmake_files.cmake index cf56031db6..5f67355965 100644 --- a/cmake/3rdParty/cmake_files.cmake +++ b/cmake/3rdParty/cmake_files.cmake @@ -10,7 +10,6 @@ set(FILES BuiltInPackages.cmake FindOpenGLInterface.cmake FindPIX.cmake - FindRadTelemetry.cmake FindVkValidation.cmake FindWwise.cmake ) diff --git a/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json b/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json index a9ed45daca..915368dd0b 100644 --- a/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json +++ b/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json @@ -12,7 +12,6 @@ "FbxSdk/2016.1.2-az.1/**": "#include", "OpenSSL/1.1.1b-noasm-az/**": "#include", "Qt/5.15.1.2-az/**": "#include", - "RadTelemetry/3.5.0.17/**": "#include", "tiff/3.9.5-az.3/**": "#include", "Wwise/2019.2.8.7432/**": "#include" }