-
Notifications
You must be signed in to change notification settings - Fork 7
/
CPUHist.taskpaper
131 lines (125 loc) · 8.07 KB
/
CPUHist.taskpaper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
CPU History:
1.2:
- cmd-w doesn't close prefs window or about window: escape does
no known way to fix? map escape to cmd-w?
bugs:
- it counts CPUs from the bottom up. CPU 1 of 4 is the bottom, contrary to what I expected.
- make window snap to screen edges
see: MGSnappingWindow, also CPU Usage
- transparency for graphing window
hook up prefs to window setting
transparency of dock icon as well?
future ideas:
- a system to keep release notes synced and build a disk image with what I need?
- allow larger graphing window, a la Act Mon
- add a percentage text overlay like loadindock
Reference:
Mem -> CPU conversion key:
- wired = user
- active = sys
- inactive = nice
- free = idle
Archive:
- get it to build @done @project(CPU Mon)
- make another pass through the source to take out extraneous references to CPUUsage @done @project(CPU Mon)
- check TODOs @done @project(CPU Mon)
- 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)
- is that how the current and last stuff is built? @done @project(CPU Mon)
- 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)
- memory leak: vm_deallocate the processorInfo array after use: @done @project(CPU Mon)
- methods needed: @done @project(CPU Mon)
- updateCPUStat: what do we want to accomplish here? @done @project(CPU Mon)
- get current data @done @project(CPU Mon)
- retrieve data at last refresh @done @project(CPU Mon)
- subtract last from current @done @project(CPU Mon)
- init: init the processor usage data: set the first "lastProcessorInfo" array so update is all good to go. @done @project(CPU Mon)
- getCurrentData @done @project(CPU Mon)
- return last data @done @project(CPU Mon)
- getNext: @done @project(CPU Mon)
- run update @done @project(CPU Mon)
- set ptr new data @done @project(CPU Mon)
- update internal ptrs @done @project(CPU Mon)
- getPrev @done @project(CPU Mon)
- return one before last? @done @project(CPU Mon)
- variables needed: @done @project(CPU Mon)
- CPUData array @done @project(CPU Mon)
- lastProcessorInfo (for diffs) @done @project(CPU Mon)
- numLastProcessorInfo (to deallocate it) @done @project(CPU Mon)
- two variables to track size, location in array @done @project(CPU Mon)
- notes: need TWO refreshes at init to get current info! @done @project(CPU Mon)
if(lastProcessorInfo) {
size_t lastProcessorInfoSize = sizeof(integer_t) * numLastProcessorInfo;
vm_deallocate(target_task, (vm_address_t)lastProcessorInfo, lastProcessorInfoSize);
}
lastProcessorInfo = processorInfo;
numLastProcessorInfo = numProcessorInfo;
- first test data coming out of cpu info with logs (this might hurt. limit to one sample every 2 sec) @done @project(CPU Mon)
- test with xcode debugger to watch array data change. @done @project(CPU Mon)
- paging rate graph @done @project(CPU Mon)
- switch the source of the graph from memory info to CPU info: @done @project(CPU Mon)
- then change graphing fct to pull from different data source @done @project(CPU Mon)
- text overlay @done @project(CPU Mon)
- change app name to CPU History @done @project(CPU Mon)
- reorder bars: sys, nice, user, idle @done @project(before any polish)
- test prefs: change in Memory Monitor, see if app picks them up @done @project(before any polish)
- properly set Dock icon @done @project(before dinner)
- fix Dock menu display @done @project(before dinner)
- if we can't make CPUInfo object, exit app gracefully @done @project(before dinner)
- finish commenting out variables and outlets @done @project(before 1.0 release)
- prefs.h @done @project(before 1.0 release)
- prefs.m @done @project(before 1.0 release)
- what is this transparency vestigal crap? @done @project(before 1.0 release)
- relink nib to new variables @done @project(before 1.0 release)
- initialize colors to different values than MemMonitor defaults @done @project(before 1.0 release)
- delete prefs file and start over: any errors reading new values? @done @project(before 1.0 release)
- try building it… @done @project(before 1.0 release)
- get rid of extraneous properties, and relink stuff in IB @done @project(before 1.0 release)
- make a color change backwards applicable: somehow redraw entire graph after prefs color change @done @project(before 1.0 release)
- call updateGraph after prefs change @done @project(before 1.0 release)
- prefs: add an option for bar width: from 1 to 20 px per bar @done @project(before 1.0 release)
- preferred: 4-6 @done @project(before 1.0 release)
- tidy up release notes, remove localizations if they're not accurate. @done @project(before 1.0 release)
- before shipping: build a full deployment vers, and move prefs file beforehand: any last bugs/missing things @done @project(before 1.0 release)
- write up app, release on cbowns.com @done @project(before 1.0 release)
- also on blog @done @project(before 1.0 release)
- try building straight @done @project(future)
- does not graph system usage @done @project(future)
- future upgrades: @done @project(future)
- CPU usage across processors: @done @project(future)
- nice values no longer exist in 10.5? @done @project(future)
- add another graph @done @project(future)
- look at dsandler's multicore patch @done @project(future)
- line-by-line code review @done @project(future)
- get # of processors with http://www.cocoadev.com/index.pl?NSProcessInfo @done @project(future)
- put a split in the view if cpus > 1: @done @project(future)
- conditional code in drawing, etc. new height offset: ( total - spacer ) / numCPUs @done @project(future)
- fill the array with zero data, paint the transparent bar to the entire display @done @project(future)
- bring increment changes to drawComplete @done @project(future)
- fix drawing of fresh window: draw transparent bar across entire graph to start @done @project(future)
- happens until the CPU data buffer has been fully filled, and you hold down "restore defaults" through TWO timer firings, then it's fixed. @done @project(future)
- can also be repro'd just by changing prefs about showing separate graph or putting graph on top @done @project(future)
- diff CPU source against memory monitor: @done @project(future)
- any changes with data source being reset? shouldn't be… @done @project(future)
- what about removing the notifications in favor of straight method callbacks? first, what's the underlying problem: don't solve what doesn't need solving @done @project(future)
- 1. app blows away graph @done @project(CPU History)
- getting overwritten by the idle time "clearing" method @done @project(CPU History)
- problem: we are storing 128 history values, but our bar width only goes down to 2 px: the redraw doesn't perform as expected @done @project(CPU History)
- either fix the drawing code to only pull the last x*barwidth ones, or do something else. @done @project(CPU History)
- drawing code not performing as expected. @done @project(CPU History)
- 1. a. @done @project(CPU History)
- blockers for 1.1: @done @project(CPU History)
- graph not working @done @project(CPU History)
- finish graphing code changes @done @project(CPU History)
- test with @boredzo @done @project(CPU History)
- floater window position @done @project(CPU History)
- divider width @done @project(CPU History)
- multicore support: @done @project(CPU History)
- migrate code changes to drawDeltas @done @project(CPU History)
- switch code back to delta by default @done @project(CPU History)
- test with @boredzo's mac pro @done @project(CPU History)
- let the user pick a divider width @done @project(CPU History)
- it's drawing too high I think @done @project(CPU History)
- floater doesn't remember last position @done @project(CPU History)
- set a pref for window position, draw graph to that location when we make it. @done @project(CPU History)
- changing prefs snaps graph back to center of screen @done @project(CPU History)
- fix preference window layout @done(2008-06-21) @project(blockers for 1.1)