mirror of
https://github.com/kopia/kopia.git
synced 2025-12-23 22:57:50 -05:00
Refactor `--profile-*` flags: - Multiple profile types can be enabled at once, before only a single type profiling could be done during a process execution. - The new `--profiles-store-on-exit` enables all available profile types, except for CPU profiling which needs to be explicitly enabled. - Profiling parameters can now be set via new flags. This allows setting the profile parameters for the pprof endpoint, as well as when saving profiles to files on exit. - Group profiling flags with other observability flags - Adds a `--diagnostics-output-directory` flag that unifies and supersedes the `--profile-dir` and `--metrics-directory` flags Enhancements and behavior changes: - Profile flags now have effect for all kopia commands, including `server start`. Before these flags did not have any effect in a few commands. - Multiple profile types can be enabled at once, before only a single type profiling could be done during a process execution. - The new `--profiles-store-on-exit` enables all available profile types, except for CPU profiling which needs to be explicitly enabled. - Profiling parameters can now be set via new flags. This allows setting the profile parameters for the pprof endpoint, as well as when saving profiles to files on exit. The following flags have been removed: - `--profile-dir`: superseded by the `--diagnostics-output-directory` flag - `--profile-blocking`: the `--profile-store-on-exit` flag enables blocking profiling. Use `--profile-blocking-rate=0` to explicitly disable it. - `--profile-memory`: the `--profile-store-on-exit` flag enables memory profiling. Use `--profile-memory-rate=0` to explicitly disable it. - `--profile-mutex`: the `--profile-store-on-exit` flag enables mutex profiling. Use `--profile-mutex-fraction=0` to explicitly disable it. Add CLI test for profile flags.
2.8 KiB
2.8 KiB