prometheus-community / node-exporter-textfile-collector-scripts

Scripts for node-exporter's textfile collector
Apache License 2.0
488 stars 185 forks source link

Optimization: Use dict setdefault to replace if key in dict #213

Open wangqingfree opened 4 months ago

wangqingfree commented 4 months ago

reference: https://realpython.com/python-defaultdict/