View Source MyspaceIPFS.Diag (Myspace IPFS v0.1.0)
MyspaceIPFS.Diag is where the diag commands of the IPFS API reside.
Link to this section Summary
Functions
Clear the command history.
List commands run by the daemon.
Collect a performance profile for debugging.
Set retention time for command history.
Print system diagnostic information.
Link to this section Functions
@spec clear() :: okresult()
Clear the command history.
@spec cmds() :: okresult()
List commands run by the daemon.
Collect a performance profile for debugging.
NB! The recv_timeout is set to 35s. This is because the profile can take a while to generate. If you are getting a timeout error, try decreasing the profile-time. The default is 30s.
parameters
Parameters
timeout: The timeout for the request. Default is 35_000 milliseonds.
This should be set to the profile-time + 5_000 milliseconds.
options
Options
https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-diag-profile
[
"output": <string>, # Output file for the profile.
"collectors": <array>, # List of collectors to use.
"profile-time": <string>, # Time to run the profiler for.
"mutex-profile-fraction": <number>, # Fraction of mutex contention events to profile.
"block-profile-rate": <number>, # Rate to sample goroutine blocking events.
]
@spec set_time(String.t()) :: okresult()
Set retention time for command history.
parameters
Parameters
time: The time to set the retention time to.
@spec sys() :: okresult()
Print system diagnostic information.