简体   繁体   中英

Analyze CPU or Memory Usage on OS X with XCode Instruments, other possibilities?

I´m using XCode Instruments for a analysis of my system performance usage of cpu and memory .

When I record the usage, especially for "2 minutes" , I got "120" (2min x 60sec, 1 value every second) values of cpu/memory usage of each process. Is it possible to get a average value for each process about his "120" values of cpu/memory usage? XCode Instruments save the logs in a .trace file, is it possible to save the logs in a text file to get all values in a human readable file?

Is there a other way to solve my problem? Maybe with a python script ?

All I want is an average percent value of cpu and memory usage of a selected process in a time interval . For example I´m using Google Chrome for "10" minutes, now I want a average percent value of cpu and memory usage in this "10" minutes.

I can answer your question about saving the logs. Some instruments let you export the trace data to CSV format. Select an instrument from your trace (there's a list of instruments on the left side of the trace window) and choose Instrument > Export Track. If this menu item is disabled for a particular instrument, it means that instrument can't export its data to CSV.

I don't have an answer to your question on getting the average value of CPU and memory usage. But I can tell you that Instruments has the Time Profiler instrument to track the CPU usage of an application and the Allocations instrument to track the memory usage of an application. Using those instruments should give you a better measure of how much CPU and memory your application is using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM