Reland "prefetch: Derive default path/ready_path from tracing_instance"
This CL is a reland of CL:35286051, this reland CL removed the unintended change from ReplayArgs to make sure prefetch_replay service work well with prefetch_record service. Previously, the default paths for the `.pack` and `_ready` files were hardcoded. This required every prefetch service definition in the `.rc` files to explicitly provide a unique `--path` argument to avoid different services overwriting each other's data. This change makes the default path dynamic by deriving it from the `--tracing-instance` argument when `--path` is not provided. For example, a service with `--tracing-instance prefetch_apex` will now default to using `/metadata/prefetch/prefetch_apex.pack`. To implement this, the `--path` and `--ready-path` arguments are now optional, and the logic for resolving the final path is encapsulated in new `get_pack_path()` and `get_ready_path()` methods on the RecordArgs struct. The rest of the codebase has been updated to use these new methods. Test: Manually verified that starting different prefetch services creates distinct .pack files based on their tracing instance. Test: Check prefetch_replay works in the log Bug: 436145792 Change-Id: Ic66778f6e1f76d19d9cdb3bcf85d777a52e8b991
Loading
Please register or sign in to comment