Skip to main content

Collect performance data for PC applications

Project description

# Introduction The tool can collect the CPU and memory of a process in the PC system and save to the local, support Mac, Windows.

#The package name process_name = packagename

#In seconds collect_time = seconds

#for windows

from performance_data_collection.WindowsCollect import Win

process_name = 'package_name'
collect_time = 10  # In seconds
win = Win(process_name, collect_time)
win.collect()

#for mac

from performance_data_collection.MacCollect import Mac

process_name = 'packagename'
collect_time = 10  # In seconds
mac = Mac(process_name, collect_time)
mac.collect()

#result

CPU:9.06%
memory:195.39MB
********************
CPU:8.80%
memory:191.50MB
********************
CPU:9.01%
memory:191.50MB
********************
CPU:9.28%
memory:191.51MB
********************
CPU:9.75%
memory:191.53MB
********************
...

[联系作者](2025331266@qq.com,747469442@qq.com)

git@gitee.com:zhou002/performance.git

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

performance_data_collection-1.0.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page