2 - change preferences file, all other applicable info.
3 - test prefs: change in Memory Monitor, see if app picks them up
4 - remove extraneous information for memory monitor:
7 - CPU usage across processors:
8 - get # of processors with http://www.cocoadev.com/index.pl?NSProcessInfo
9 - add another graph or average across both cores?
12 CPUInfo *cpuInfo = [[CPUInfo alloc] initWithCapacity:size];
16 for (j = 0; j < 48; j++) {
17 for (i = 0; i < 1000000; ) {
23 [cpuInfo startIterate];
24 for (i = 0; [cpuInfo getNext:&cpuData]; i++) {
25 NSLog(@"user: %e\n", cpuData.user);
26 NSLog(@"sys: %e\n", cpuData.sys);
27 NSLog(@"nice: %e\n", cpuData.nice);
28 NSLog(@"idle: %e\n", cpuData.idle);
42 - get it to build @done @project(CPU Mon)
43 - make another pass through the source to take out extraneous references to CPUUsage @done @project(CPU Mon)
44 - check TODOs @done @project(CPU Mon)
45 - how to do data update: make a large float array with my usage data in it, use a rolling pointer to update things. store new data from current cpu stats. @done @project(CPU Mon)
46 - is that how the current and last stuff is built? @done @project(CPU Mon)
47 - in other words, I need to pass the pointer by reference so I can modify its value (ie the memory it points to). keep in mind, someone has to clean up after the old memory. @done @project(CPU Mon)
48 - memory leak: vm_deallocate the processorInfo array after use: @done @project(CPU Mon)
49 - methods needed: @done @project(CPU Mon)
50 - updateCPUStat: what do we want to accomplish here? @done @project(CPU Mon)
51 - get current data @done @project(CPU Mon)
52 - retrieve data at last refresh @done @project(CPU Mon)
53 - subtract last from current @done @project(CPU Mon)
54 - init: init the processor usage data: set the first "lastProcessorInfo" array so update is all good to go. @done @project(CPU Mon)
55 - getCurrentData @done @project(CPU Mon)
56 - return last data @done @project(CPU Mon)
57 - getNext: @done @project(CPU Mon)
58 - run update @done @project(CPU Mon)
59 - set ptr new data @done @project(CPU Mon)
60 - update internal ptrs @done @project(CPU Mon)
61 - getPrev @done @project(CPU Mon)
62 - return one before last? @done @project(CPU Mon)
63 - variables needed: @done @project(CPU Mon)
64 - CPUData array @done @project(CPU Mon)
65 - lastProcessorInfo (for diffs) @done @project(CPU Mon)
66 - numLastProcessorInfo (to deallocate it) @done @project(CPU Mon)
67 - two variables to track size, location in array @done @project(CPU Mon)
68 - notes: need TWO refreshes at init to get current info! @done @project(CPU Mon)
69 if(lastProcessorInfo) {
70 size_t lastProcessorInfoSize = sizeof(integer_t) * numLastProcessorInfo;
71 vm_deallocate(target_task, (vm_address_t)lastProcessorInfo, lastProcessorInfoSize);
74 lastProcessorInfo = processorInfo;
75 numLastProcessorInfo = numProcessorInfo;
76 - first test data coming out of cpu info with logs (this might hurt. limit to one sample every 2 sec) @done @project(CPU Mon)
77 - test with xcode debugger to watch array data change. @done @project(CPU Mon)
78 - paging rate graph @done @project(CPU Mon)
79 - switch the source of the graph from memory info to CPU info: @done @project(CPU Mon)
80 - then change graphing fct to pull from different data source @done @project(CPU Mon)
81 - text overlay @done @project(CPU Mon)
82 - change app name to CPU History @done @project(CPU Mon)