3 ` @s@ddlZddlZddlZGdddejZedkrszPlugin.run..zsudo docker stats --no-stream --no-trunc --format "{{.CPUPerc}} / {{.Name}} / {{.ID}} / {{.MemUsage}} / {{.NetIO}} / {{.BlockIO}} / {{.MemPerc}}"r%ZcpuZmem_usage_bytesZmem_total_bytesz%s_%sZ net_in_bytesZ net_out_bytesZ disk_in_bytesZdisk_out_bytes Zmem_pctN containersts) Zget_agent_cacheospopenread splitlinesstripcomputerReadableZabsolute_to_per_second ExceptionmessagelentimeZset_agent_cache) selfconfigr last_valueZ prev_cachelinesrowZ containernameZ container_iderrrrun s:$$$$   z Plugin.runcCs|dddkr$t|dddS|dddkrLt|ddddS|dddkrxt|dddddS|dddkrt|ddddddS|dddkrt|dddddddS|ddd krt|dddS|ddd kr.t|ddddS|ddd kr\t|dddddS|d dd krt|dd!ddddS|d"dd krt|dd#dddddS|d$ddkrt|dd%SdS)&Nr ZKiBiZMiBZGiBZTiBZPiBr ZkBZMBZGBZTBZPBr Br(r(r(r(r(r(r(r(r(r)r)r)r)r)r)r)r)r)r*)float)rvaluerrrr1s, $ $zPlugin.computerReadableN)__name__ __module__ __qualname__r&rrrrrrs&r__main__)rZpluginsrZ BasePluginrr-executerrrrs A