Skip to content
Open
Show file tree
Hide file tree
Changes from 172 commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
28c3662
init
w-czerski Feb 24, 2025
3b416e7
Add profiler configuration
w-czerski Feb 24, 2025
95ae140
rename fix
w-czerski Feb 24, 2025
aae4e6d
remove unused
w-czerski Feb 24, 2025
504f796
remove unused services
w-czerski Feb 24, 2025
3de9a4f
fix headers
w-czerski Feb 24, 2025
a795f7e
debug display on screen
w-czerski Feb 24, 2025
5da4f22
add siplay fps on screen | add refleciton of config
w-czerski Feb 24, 2025
691cef6
improvements
w-czerski Feb 24, 2025
794f8e4
clean up
w-czerski Feb 24, 2025
463d7b0
clang format
w-czerski Feb 24, 2025
1a6b537
fix game launcher ddebug display
w-czerski Feb 24, 2025
d6731b2
save with timestamp
w-czerski Feb 25, 2025
7e03adc
change fps color
w-czerski Feb 25, 2025
67e57ef
Add notification bus for created files
w-czerski Feb 25, 2025
f4109b2
add warning
w-czerski Feb 25, 2025
3c457a8
fix warning - use c_str
w-czerski Feb 25, 2025
f45ffcc
change name
w-czerski Feb 25, 2025
cb9579f
add info in tick
w-czerski Feb 25, 2025
f0f2ead
refactor
w-czerski Feb 25, 2025
f3aa038
fix calcuatlion of avergage frame
w-czerski Feb 25, 2025
50ce465
fix precision to near zero values
w-czerski Feb 25, 2025
b34b388
format
w-czerski Feb 25, 2025
7e6cd09
add more editor options | specify precision and occurrance size
w-czerski Feb 25, 2025
b2ad8f1
clang format
w-czerski Feb 25, 2025
a2d9d01
add cpu and gpu memory collect
w-czerski Feb 25, 2025
a9fa50f
clean up tick | clang format
w-czerski Feb 25, 2025
db92a49
make memory getter functions static
w-czerski Feb 25, 2025
51a18fb
use detailed memory flag
w-czerski Feb 25, 2025
6968a67
fix fps data struct reflection | fix system component, clean up, adju…
w-czerski Feb 27, 2025
76c2b6a
refactor
w-czerski Feb 27, 2025
7e3fdb2
refactor
w-czerski Feb 27, 2025
5aa41f2
refactor | remove redundant headers | remove rpi from cmake, use only…
w-czerski Feb 27, 2025
38f2e6a
rename to Fps | use const reference for notification bus
w-czerski Feb 27, 2025
a4b862f
move static functions to public
w-czerski Feb 27, 2025
6a60562
fix near zero editor reflection
w-czerski Feb 27, 2025
6caedf3
add request bus info | implement bus overrides
w-czerski Feb 27, 2025
632250f
fix activate / deactivate
w-czerski Feb 27, 2025
5230699
rename profiler data -> profiler config
w-czerski Feb 27, 2025
a1f031c
add fix config layout
w-czerski Feb 27, 2025
18444cc
add fix config layout
w-czerski Feb 27, 2025
e1e25a9
add is any save option enabled
w-czerski Feb 27, 2025
9e53459
add option to change save path
w-czerski Feb 27, 2025
2aa4a31
clang format
w-czerski Feb 27, 2025
3f34943
typo fix
w-czerski Feb 27, 2025
48173da
exit early when no save option enabled
w-czerski Feb 27, 2025
53f4144
mark disabled data to -1.0f | using 0.0f might be confusing
w-czerski Feb 28, 2025
0cd0d2c
fix near zero comparison
w-czerski Feb 28, 2025
790e65e
add option to disable instant profiling in editor
w-czerski Feb 28, 2025
63aab4f
fix profiling setup on tick and activate
w-czerski Feb 28, 2025
e6e5013
clang format
w-czerski Feb 28, 2025
efad6b9
apply code review | add path validation | code improvement
w-czerski Mar 3, 2025
d3c67c8
clang tidy & format
w-czerski Mar 3, 2025
e706b4b
valdiate path on activation
w-czerski Mar 3, 2025
8b6bf19
update reflect name
w-czerski Mar 3, 2025
2078121
fix file creation | timestamp
w-czerski Mar 3, 2025
2fcd35d
fix memory reserve
w-czerski Mar 3, 2025
fce0b1f
replace string with IO:PATH
w-czerski Mar 3, 2025
d21c05f
remove redundant code
w-czerski Mar 3, 2025
9a5543c
change string path to AZ:IO:PATH
w-czerski Mar 3, 2025
59ffb83
use deque instead of vector
w-czerski Mar 3, 2025
9180fd9
reflect missing variable
w-czerski Mar 3, 2025
543a644
add info to gem.json
w-czerski Mar 4, 2025
73251a1
init readme
w-czerski Mar 4, 2025
21c6010
add context to readme
w-czerski Mar 4, 2025
b4bcbdb
add extra notification buses for stop/start/reset
w-czerski Mar 4, 2025
5f4e612
add print reset info
w-czerski Mar 4, 2025
b47751b
restore version bump
w-czerski Mar 4, 2025
4032525
clear log entires fix
w-czerski Mar 4, 2025
83fe314
fix comments for deque
w-czerski Mar 4, 2025
0c4440e
init editor variables
w-czerski Mar 4, 2025
106ebad
update comment variable names
w-czerski Mar 4, 2025
e39c70d
remove string format | use char vector | fix buffer allocation
w-czerski Mar 4, 2025
0fecc4c
remove redundant comments
w-czerski Mar 4, 2025
dc7a8a0
use Basic report flag | save 5.0ms
w-czerski Mar 4, 2025
4619a24
remove comment
w-czerski Mar 4, 2025
cf84709
remove redundant code
w-czerski Mar 4, 2025
aac47a9
clean up
w-czerski Mar 4, 2025
db6c49b
add biref summary for profiler bus
w-czerski Mar 4, 2025
cc6f38e
add to log buffer reserved memory data
w-czerski Mar 4, 2025
4d8ca57
change sizte_to -> AZStd::size_t
w-czerski Mar 4, 2025
f033838
fix layout | move buffer size to constexpr outside scope
w-czerski Mar 4, 2025
26eadbb
fix table in readme | imrpove readability
w-czerski Mar 4, 2025
4f4146d
fix readme table
w-czerski Mar 4, 2025
64aca44
restore affected files by clang format
w-czerski Mar 5, 2025
12dc522
use max buffer line size for memory reserve
w-czerski Mar 5, 2025
6c58aa3
remove if else | improve readability
w-czerski Mar 5, 2025
1832ce7
remove profile flag
w-czerski Mar 5, 2025
8724852
add warning print for stop/reset
w-czerski Mar 5, 2025
4262502
queue start profile on activation | add aditional bool flag
w-czerski Mar 5, 2025
9912fca
explanation why use minFps = FloatMax
w-czerski Mar 5, 2025
01992e5
clean up | remove profiling flag
w-czerski Mar 5, 2025
702baf7
refactor layout of config
w-czerski Mar 5, 2025
57911e9
rename config file
w-czerski Mar 5, 2025
567d1b1
move to config structs to namespace Config
w-czerski Mar 5, 2025
93bb809
rename config | add multiple config strutcs | add type ids
w-czerski Mar 5, 2025
4c4537a
fix mask bit shifts
w-czerski Mar 5, 2025
5b9928b
extra option
w-czerski Mar 5, 2025
b18e30b
rename
w-czerski Mar 5, 2025
3d3e88e
create reflect for RecrodSettings
w-czerski Mar 5, 2025
c776279
add other config refelcetions
w-czerski Mar 5, 2025
584c283
add new config to system component
w-czerski Mar 5, 2025
ef6993a
remove enum int cast
w-czerski Mar 5, 2025
c983655
replace old config | build success
w-czerski Mar 6, 2025
46cff25
change version to 0 | use static cast
w-czerski Mar 6, 2025
7ef0556
remove reflect duplicates
w-czerski Mar 6, 2025
502c8bb
fix tick comparison
w-czerski Mar 6, 2025
eb527dc
remove bool from enum
w-czerski Mar 6, 2025
fc4f2d9
add EMA calculation | add smoothing factor
w-czerski Mar 6, 2025
158f1f7
refresh ui
w-czerski Mar 6, 2025
eeacd81
enable print when debug selected
w-czerski Mar 6, 2025
543c3d8
reflect enum
w-czerski Mar 6, 2025
79e231b
remove bool toogles | using enum values
w-czerski Mar 6, 2025
f809190
fix mask comparison
w-czerski Mar 6, 2025
1caa08a
typo fix
w-czerski Mar 6, 2025
23fba4e
fix save data on exit
w-czerski Mar 6, 2025
9be7ec0
fix prfoile start
w-czerski Mar 6, 2025
e115b8d
deactivate fix
w-czerski Mar 6, 2025
9f4a386
simplyfy frame count
w-czerski Mar 6, 2025
445ba4b
remove redundant if statement4
w-czerski Mar 6, 2025
3a1df1d
apply seconds to timestamp
w-czerski Mar 6, 2025
9e70d78
fix comment
w-czerski Mar 6, 2025
f3dd0e9
fix file save on deactivation
w-czerski Mar 6, 2025
02eea87
remove enum serialization
w-czerski Mar 7, 2025
269ddc4
Add Config reflection to System Component
w-czerski Mar 11, 2025
36296d6
create config dir | move config | fix config reflect
w-czerski Mar 11, 2025
8b0a573
simplify if check
w-czerski Mar 11, 2025
bb3fd64
add final to system component
w-czerski Mar 11, 2025
83e92db
swap IO Path to String | add button to add path
w-czerski Mar 17, 2025
5f5f80e
fix headers
w-czerski Mar 17, 2025
8f6c577
rename function
w-czerski Mar 17, 2025
eb1bfc5
clang format
w-czerski Mar 17, 2025
9caff34
remove system in name suffix
w-czerski Mar 17, 2025
e82b2f0
use path.c_str
w-czerski Mar 17, 2025
00ebce0
rename System Component -> Component | remove unused
w-czerski Mar 17, 2025
75f7a23
rename type ids | fix uuid duplicate
w-czerski Mar 17, 2025
988f8e2
resolve serialize duplicates
w-czerski Mar 17, 2025
7947cf6
fix path selector and validation
w-czerski Mar 17, 2025
448e31c
rename
w-czerski Mar 17, 2025
48e57d3
add lua and script canvas support
w-czerski Mar 17, 2025
b54c663
fix path swap to string | operate on IO::Path
w-czerski Mar 17, 2025
0cb786e
option to keep hisotry for better precision
w-czerski Mar 17, 2025
c6dcfe8
fix keep history setting | fix reflect description
w-czerski Mar 17, 2025
329ad2f
simplify logic | clang format
w-czerski Mar 17, 2025
21cb54f
fix game launcher | pass settings from editor
w-czerski Mar 17, 2025
882dd9f
fix formatting | make fields protected
w-czerski Mar 17, 2025
041b8db
add button description
w-czerski Mar 17, 2025
e4c7513
add better description
w-czerski Mar 17, 2025
fb9e926
refactor
w-czerski Mar 17, 2025
c038df1
fix config reflect
w-czerski Mar 17, 2025
c32faf8
add debug visiblity on enabled button
w-czerski Mar 17, 2025
0017cf8
readme update
w-czerski Mar 18, 2025
77ca9e1
readme table update
w-czerski Mar 18, 2025
cddb207
update images resolution
w-czerski Mar 18, 2025
b46a517
add behaviour context for configs | update profile bus
w-czerski Mar 18, 2025
c3074cf
readme update | fix behaviour reflect
w-czerski Mar 18, 2025
2fb02a7
fix formatting
w-czerski Apr 3, 2025
70db269
fix formatting cmake
w-czerski Apr 3, 2025
35f6a20
add missing new line
w-czerski Apr 3, 2025
aa875b1
ediotr context for component
w-czerski Apr 3, 2025
ab86e28
remove editor source files from cmake
w-czerski Apr 3, 2025
c1abc2d
remove ediotr component
w-czerski Apr 3, 2025
c970d6d
remove editor component depencencies
w-czerski Apr 3, 2025
8d2d912
remove editor component type id
w-czerski Apr 3, 2025
15b1771
change path string into AZ::IO::Path
w-czerski Apr 3, 2025
ca30500
remove unecessary checks for config refelections
w-czerski Apr 3, 2025
e164d0e
make config private | refactor
w-czerski Apr 3, 2025
a8b8a45
remove const from bus notifies - blocking file modifications
w-czerski Apr 3, 2025
3ba5c4b
fixed fps counter display positioning
w-czerski Apr 3, 2025
99c5e6f
fix readme conflicts
w-czerski Apr 3, 2025
0ebc0a1
readme update
w-czerski Apr 3, 2025
1be2924
Merge branch 'main' into wc/fps_profiler
w-czerski Apr 3, 2025
6c209c7
remove pure vritual from notify bus
w-czerski Apr 4, 2025
427dcd8
add GetRequiredComponentType list override
w-czerski Apr 4, 2025
55879d4
mark path seleciton as read only
w-czerski Apr 4, 2025
6a382ab
update path validation function
w-czerski Apr 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added Gems/FPSProfiler/.gitignore
Empty file.
6 changes: 6 additions & 0 deletions Gems/FPSProfiler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

o3de_gem_setup("FPSProfiler")

ly_add_external_target_path(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty)

add_subdirectory(Code)
248 changes: 248 additions & 0 deletions Gems/FPSProfiler/Code/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@

# Currently we are in the Code folder: ${CMAKE_CURRENT_LIST_DIR}
# Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}
# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform
# in which case it will see if that platform is present here or in the restricted folder.
# i.e. It could here in our gem : Gems/FPSProfiler/Code/Platform/<platorm_name> or
# <restricted_folder>/<platform_name>/Gems/FPSProfiler/Code
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")

# Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the
# traits for this platform. Traits for a platform are defines for things like whether or not something in this gem
# is supported by this platform.
include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)

# Check to see if building the Gem Modules are supported for the current platform
if(NOT PAL_TRAIT_FPSPROFILER_SUPPORTED)
return()
endif()

# The ${gem_name}.API target declares the common interface that users of this gem should depend on in their targets
ly_add_target(
NAME ${gem_name}.API INTERFACE
NAMESPACE Gem
FILES_CMAKE
fpsprofiler_api_files.cmake
${pal_dir}/fpsprofiler_api_files.cmake
INCLUDE_DIRECTORIES
INTERFACE
Include
BUILD_DEPENDENCIES
INTERFACE
AZ::AzCore
AZ::AzFramework
)

# The ${gem_name}.Private.Object target is an internal target
# It should not be used outside of this Gems CMakeLists.txt
ly_add_target(
NAME ${gem_name}.Private.Object STATIC
NAMESPACE Gem
FILES_CMAKE
fpsprofiler_private_files.cmake
${pal_dir}/fpsprofiler_private_files.cmake
TARGET_PROPERTIES
O3DE_PRIVATE_TARGET TRUE
INCLUDE_DIRECTORIES
PRIVATE
Include
Source
BUILD_DEPENDENCIES
PUBLIC
AZ::AzCore
AZ::AzFramework
AZ::AzToolsFramework
Gem::Atom_RHI.Public
)

# Here add ${gem_name} target, it depends on the Private Object library and Public API interface
ly_add_target(
NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
NAMESPACE Gem
FILES_CMAKE
fpsprofiler_shared_files.cmake
${pal_dir}/fpsprofiler_shared_files.cmake
INCLUDE_DIRECTORIES
PUBLIC
Include
PRIVATE
Source
BUILD_DEPENDENCIES
PUBLIC
Gem::${gem_name}.API
PRIVATE
Gem::${gem_name}.Private.Object
)

# Include the gem name into the Client Module source file
# for use with the AZ_DECLARE_MODULE_CLASS macro
# This is to allow renaming of the gem to also cause
# the CreateModuleClass_Gem_<gem-name> function which
# is used to bootstrap the gem in monolithic builds to link to the new gem name
ly_add_source_properties(
SOURCES
Source/Clients/FPSProfilerModule.cpp
PROPERTY COMPILE_DEFINITIONS
VALUES
O3DE_GEM_NAME=${gem_name}
O3DE_GEM_VERSION=${gem_version})

# By default, we will specify that the above target ${gem_name} would be used by
# Client and Server type targets when this gem is enabled. If you don't want it
# active in Clients or Servers by default, delete one of both of the following lines:
ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})

# For the Client and Server variants of ${gem_name} Gem, an alias to the ${gem_name}.API target will be made
ly_create_alias(NAME ${gem_name}.Clients.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
ly_create_alias(NAME ${gem_name}.Servers.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
ly_create_alias(NAME ${gem_name}.Unified.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)

# Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
# for the Clients, Servers, Unified gem variants
o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Clients Servers Unified)

# If we are on a host platform, we want to add the host tools targets like the ${gem_name}.Editor MODULE target
if(PAL_TRAIT_BUILD_HOST_TOOLS)
# The ${gem_name}.Editor.API target can be used by other gems that want to interact with the ${gem_name}.Editor module
ly_add_target(
NAME ${gem_name}.Editor.API INTERFACE
NAMESPACE Gem
FILES_CMAKE
fpsprofiler_editor_api_files.cmake
${pal_dir}/fpsprofiler_editor_api_files.cmake
INCLUDE_DIRECTORIES
INTERFACE
Include
BUILD_DEPENDENCIES
INTERFACE
AZ::AzToolsFramework
)

# The ${gem_name}.Editor.Private.Object target is an internal target
# which is only to be used by this gems CMakeLists.txt and any subdirectories
# Other gems should not use this target
ly_add_target(
NAME ${gem_name}.Editor.Private.Object STATIC
NAMESPACE Gem
FILES_CMAKE
fpsprofiler_editor_private_files.cmake
TARGET_PROPERTIES
O3DE_PRIVATE_TARGET TRUE
INCLUDE_DIRECTORIES
PRIVATE
Include
Source
BUILD_DEPENDENCIES
PUBLIC
AZ::AzToolsFramework
${gem_name}.Private.Object
)

ly_add_target(
NAME ${gem_name}.Editor GEM_MODULE
NAMESPACE Gem
AUTOMOC
FILES_CMAKE
fpsprofiler_editor_shared_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Source
PUBLIC
Include
BUILD_DEPENDENCIES
PUBLIC
Gem::${gem_name}.Editor.API
PRIVATE
Gem::${gem_name}.Editor.Private.Object
)

# Include the gem name into the Editor Module source file
# for use with the AZ_DECLARE_MODULE_CLASS macro
# This is to allow renaming of the gem to also cause
# the CreateModuleClass_Gem_<gem-name> function which
# is used to bootstrap the gem in monolithic builds to link to the new gem name
ly_add_source_properties(
SOURCES
Source/Tools/FPSProfilerEditorModule.cpp
PROPERTY COMPILE_DEFINITIONS
VALUES
O3DE_GEM_NAME=${gem_name}
O3DE_GEM_VERSION=${gem_version})

# By default, we will specify that the above target ${gem_name} would be used by
# Tool and Builder type targets when this gem is enabled. If you don't want it
# active in Tools or Builders by default, delete one of both of the following lines:
ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)

# For the Tools and Builders variants of ${gem_name} Gem, an alias to the ${gem_name}.Editor API target will be made
ly_create_alias(NAME ${gem_name}.Tools.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
ly_create_alias(NAME ${gem_name}.Builders.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)

# Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
# for the Tools and Builders gem variants
o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Tools Builders)
endif()

################################################################################
# Tests
################################################################################
# See if globally, tests are supported
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
# We globally support tests, see if we support tests on this platform for ${gem_name}.Tests
if(PAL_TRAIT_FPSPROFILER_TEST_SUPPORTED)
# We support ${gem_name}.Tests on this platform, add dependency on the Private Object target
ly_add_target(
NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
fpsprofiler_tests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
Source
Include
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTest
AZ::AzFramework
Gem::${gem_name}.Private.Object
)

# Add ${gem_name}.Tests to googletest
ly_add_googletest(
NAME Gem::${gem_name}.Tests
)
endif()

# If we are a host platform we want to add tools test like editor tests here
if(PAL_TRAIT_BUILD_HOST_TOOLS)
# We are a host platform, see if Editor tests are supported on this platform
if(PAL_TRAIT_FPSPROFILER_EDITOR_TEST_SUPPORTED)
# We support ${gem_name}.Editor.Tests on this platform, add ${gem_name}.Editor.Tests target which depends on
# private ${gem_name}.Editor.Private.Object target
ly_add_target(
NAME ${gem_name}.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
fpsprofiler_editor_tests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
Source
Include
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTest
Gem::${gem_name}.Editor.Private.Object
)

# Add ${gem_name}.Editor.Tests to googletest
ly_add_googletest(
NAME Gem::${gem_name}.Editor.Tests
)
endif()
endif()
endif()
Loading