MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / _write_to_file

Method _write_to_file

fastdeploy/usage/usage_lib.py:356–361  ·  view source on GitHub ↗
(self, data: dict[str, Any])

Source from the content-addressed store, hash-verified

354 self._send_to_server(data)
355
356 def _write_to_file(self, data: dict[str, Any]) -> None:
357 os.makedirs(os.path.dirname(_USAGE_STATS_JSON_PATH), exist_ok=True)
358 Path(_USAGE_STATS_JSON_PATH).touch(exist_ok=True)
359 with open(_USAGE_STATS_JSON_PATH, "a") as f:
360 json.dump(data, f)
361 f.write("\n")
362
363
364def report_usage_stats(fd_config: FDConfig) -> None:

Callers 3

_report_usage_onceMethod · 0.95
test_write_to_fileMethod · 0.95

Calls 2

dumpMethod · 0.80
writeMethod · 0.80

Tested by 1

test_write_to_fileMethod · 0.76