MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / write_persisted

Function write_persisted

src/config.rs:218–225  ·  view source on GitHub ↗

Write the canonical [`PersistedConfig`] to disk.

(persisted: &PersistedConfig, config_name: Option<&str>)

Source from the content-addressed store, hash-verified

216
217/// Write the canonical [`PersistedConfig`] to disk.
218fn write_persisted(persisted: &PersistedConfig, config_name: Option<&str>) -> Result<()> {
219 let config_path = get_configuration_file_path(config_name);
220 fs::create_dir_all(config_path.parent().unwrap())?;
221 let config_str = serde_yaml::to_string(persisted)?;
222 fs::write(&config_path, config_str)?;
223 debug!("Config written to {}", config_path.display());
224 Ok(())
225}
226
227impl CodSpeedConfig {
228 pub fn load_with_profile(

Callers 2

load_with_profileMethod · 0.85
persistMethod · 0.85

Calls 1

Tested by

no test coverage detected