Allow multiple configuration files
Closed this issue · 2 comments
Sometimes we want to profile more than one app on the same computer. In this case, currently configuring via config files doesn't work as there can only be one config file per profiler instance.
We have to evaluate if we want to support this scenario or if maybe just copy-pasting the profiler binaries (and thus the configs) to a new folder is already enough to handle this scenario
discussed: we want to have a three stage approach to reading config files:
- read from a fixed file in the profiler's directory (as is done right now)
- read from a file with the process name in the profiler directory (e.g. myapp.exe.profilercfg)
- read from the environment
with each step overwriting the previous one
The GUI should be able to modify all of these files (without being able to generate invalid files).
all existing config files (profiler, GUI, uploader) should be merged into one file. Thus, the uploader needs to be modified to also "merge" the different configs as described above (though we do not require it to be configurable by env variables. That's just for the profiler itself)
when implementing this, I instead opted for the simpler approach of using a yaml library to parse a yaml file that allows us to achieve the same goals without needing a complex setup of multiple config files