Get running Live image of Agama. If some additional software is needed to install like valgrind, TW repo needs to be added by zypper. Also it is good to stop agama before doing adjustments.
To get pmap of backend service search for service pid e.g. using ps aux | grep agama
and then pass pid to pmap call. It is good to measure overall memory consumption of given component or doing serie of it to see how it differs in time.
Install memory profiler with gem install memory_profiler
( do not confuse with memory-profiler which is different gem ). Then modify dbus file of component to run it.
E.g. for software edit /usr/share/dbus-1/agama-services/org.opensuse.Agama.Software.service
and change exec to Exec=/usr/bin/ruby-memory-profiler.ruby3.2 -o /tmp/software.profile.txt --pretty agamactl -- software
. Then start agama and to get final result it needs again to stop agama.
Similar way it can be changed e.g. to valgrind.