maglev-webtools 0.2.1 → 1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +38 -29
- data/bin/webtools +22 -1
- data/lib/web_tools/code_browser.rb +156 -0
- data/lib/web_tools/debugger.rb +96 -199
- data/lib/web_tools/info.rb +1 -3
- data/lib/web_tools/method_list.rb +67 -0
- data/lib/web_tools/middleware/debugger.rb +10 -16
- data/lib/web_tools/object_log.rb +24 -0
- data/lib/web_tools/session_list.rb +119 -0
- data/lib/web_tools/shared_page_cache.rb +30 -0
- data/lib/web_tools/stat_process.rb +24 -0
- data/lib/web_tools/statistics.rb +14 -0
- data/lib/web_tools/support/app_model.rb +66 -101
- data/lib/web_tools/support/code_browser.rb +88 -86
- data/lib/web_tools/support/debugger.rb +303 -0
- data/lib/web_tools/support/error_log.rb +33 -0
- data/lib/web_tools/support/ruby.rb +60 -121
- data/lib/web_tools/support/service_helper.rb +38 -10
- data/lib/web_tools/support/smalltalk_extensions.rb +12 -0
- data/lib/web_tools/tool.rb +48 -0
- data/lib/web_tools/ui.rb +14 -53
- data/lib/web_tools/version_report.rb +29 -0
- data/lib/web_tools/workspace.rb +77 -0
- data/lib/web_tools.rb +14 -4
- data/public/CodeBrowser.html +51 -0
- data/public/CodeMirror/LICENSE +19 -0
- data/public/CodeMirror/css/codemirror.css +67 -0
- data/public/CodeMirror/css/default.css +18 -0
- data/public/CodeMirror/js/codemirror.js +2131 -0
- data/public/CodeMirror/js/ruby.js +195 -0
- data/public/CodeMirror/js/smalltalk.js +139 -0
- data/public/Debugger.html +28 -0
- data/public/MethodList.html +20 -0
- data/public/ObjectLog.html +20 -0
- data/public/SessionList.html +31 -0
- data/public/SharedPageCache.html +78 -0
- data/public/Statistics.html +64 -0
- data/public/VersionReport.html +50 -0
- data/public/Workspace.html +39 -0
- data/public/css/CodeBrowser.css +24 -0
- data/public/css/Debugger.css +32 -0
- data/public/css/MethodList.css +8 -0
- data/public/css/ObjectLog.css +5 -0
- data/public/css/SessionList.css +9 -0
- data/public/css/Statistics.css +24 -0
- data/public/{stylesheets → css}/base/images/ui-anim_basic_16x16.gif +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_222222_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_454545_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_888888_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.accordion.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.all.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.autocomplete.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.base.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.button.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.core.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.datepicker.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.dialog.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.progressbar.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.resizable.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.selectable.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.slider.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.tabs.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.theme.css +0 -0
- data/public/css/editor.css +25 -0
- data/public/css/jjmenu.css +33 -0
- data/public/css/menuitem.gif +0 -0
- data/public/css/more.gif +0 -0
- data/public/{stylesheets → css}/reset.css +1 -1
- data/public/css/smoothness/images/ui-anim_basic_16x16.gif +0 -0
- data/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/css/smoothness/jquery-ui.css +489 -0
- data/public/css/ui-lightness/images/ui-anim_basic_16x16.gif +0 -0
- data/public/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/css/ui-lightness/jquery-ui.css +489 -0
- data/public/css/webtools.css +65 -0
- data/public/favicon.ico +0 -0
- data/public/flot/API.txt +1201 -0
- data/public/flot/FAQ.txt +76 -0
- data/public/flot/LICENSE.txt +22 -0
- data/public/flot/Makefile +9 -0
- data/public/flot/NEWS.txt +508 -0
- data/public/flot/PLUGINS.txt +137 -0
- data/public/flot/README.txt +90 -0
- data/public/flot/examples/ajax.html +143 -0
- data/public/flot/examples/annotating.html +75 -0
- data/public/flot/examples/arrow-down.gif +0 -0
- data/public/flot/examples/arrow-left.gif +0 -0
- data/public/flot/examples/arrow-right.gif +0 -0
- data/public/flot/examples/arrow-up.gif +0 -0
- data/public/flot/examples/basic.html +38 -0
- data/public/flot/examples/data-eu-gdp-growth-1.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-2.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-3.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-4.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-5.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth.json +4 -0
- data/public/flot/examples/data-japan-gdp-growth.json +4 -0
- data/public/flot/examples/data-usa-gdp-growth.json +4 -0
- data/public/flot/examples/graph-types.html +75 -0
- data/public/flot/examples/hs-2004-27-a-large_web.jpg +0 -0
- data/public/flot/examples/image.html +45 -0
- data/public/flot/examples/index.html +44 -0
- data/public/flot/examples/interacting-axes.html +97 -0
- data/public/flot/examples/interacting.html +93 -0
- data/public/flot/examples/layout.css +6 -0
- data/public/flot/examples/multiple-axes.html +60 -0
- data/public/flot/examples/navigate.html +118 -0
- data/public/flot/examples/percentiles.html +57 -0
- data/public/flot/examples/pie.html +756 -0
- data/public/flot/examples/realtime.html +83 -0
- data/public/flot/examples/resize.html +61 -0
- data/public/flot/examples/selection.html +114 -0
- data/public/flot/examples/setting-options.html +61 -0
- data/public/flot/examples/stacking.html +77 -0
- data/public/flot/examples/symbols.html +49 -0
- data/public/flot/examples/thresholding.html +54 -0
- data/public/flot/examples/time.html +71 -0
- data/public/flot/examples/tracking.html +95 -0
- data/public/flot/examples/turning-series.html +98 -0
- data/public/flot/examples/visitors.html +90 -0
- data/public/flot/examples/zooming.html +98 -0
- data/public/flot/excanvas.js +1427 -0
- data/public/flot/excanvas.min.js +1 -0
- data/public/flot/jquery.colorhelpers.js +179 -0
- data/public/flot/jquery.colorhelpers.min.js +1 -0
- data/public/flot/jquery.flot.crosshair.js +167 -0
- data/public/flot/jquery.flot.crosshair.min.js +1 -0
- data/public/flot/jquery.flot.fillbetween.js +183 -0
- data/public/flot/jquery.flot.fillbetween.min.js +1 -0
- data/public/flot/jquery.flot.image.js +238 -0
- data/public/flot/jquery.flot.image.min.js +1 -0
- data/public/flot/jquery.flot.js +2599 -0
- data/public/flot/jquery.flot.min.js +6 -0
- data/public/flot/jquery.flot.navigate.js +336 -0
- data/public/flot/jquery.flot.navigate.min.js +1 -0
- data/public/flot/jquery.flot.pie.js +750 -0
- data/public/flot/jquery.flot.pie.min.js +1 -0
- data/public/flot/jquery.flot.resize.js +60 -0
- data/public/flot/jquery.flot.resize.min.js +1 -0
- data/public/flot/jquery.flot.selection.js +344 -0
- data/public/flot/jquery.flot.selection.min.js +1 -0
- data/public/flot/jquery.flot.stack.js +184 -0
- data/public/flot/jquery.flot.stack.min.js +1 -0
- data/public/flot/jquery.flot.symbol.js +70 -0
- data/public/flot/jquery.flot.symbol.min.js +1 -0
- data/public/flot/jquery.flot.threshold.js +103 -0
- data/public/flot/jquery.flot.threshold.min.js +1 -0
- data/public/flot/jquery.js +8316 -0
- data/public/flot/jquery.min.js +23 -0
- data/public/genPacking.pl +30 -0
- data/public/index.html +28 -0
- data/public/install.tpz +66 -0
- data/public/installAndRun.tpz +5 -0
- data/public/jsTree/jquery.jstree.js +3510 -0
- data/public/jsTree/themes/default/d.gif +0 -0
- data/public/jsTree/themes/default/d.png +0 -0
- data/public/jsTree/themes/default/style.css +73 -0
- data/public/jsTree/themes/default/throbber.gif +0 -0
- data/public/readMe.txt +9 -0
- data/public/scripts/CodeBrowser.js +645 -0
- data/public/scripts/Debugger.js +134 -0
- data/public/scripts/MethodList.js +72 -0
- data/public/scripts/ObjectLog.js +59 -0
- data/public/scripts/SessionList.js +164 -0
- data/public/scripts/Statistics.js +266 -0
- data/public/scripts/editor.js +430 -0
- data/public/scripts/jjmenu.js +375 -0
- data/public/scripts/jquery-ui.js +1012 -0
- data/public/scripts/jquery.js +154 -0
- data/public/scripts/webtools.js +374 -0
- data/public/src/CodeBrowser.gs +416 -0
- data/public/src/Debugger.gs +132 -0
- data/public/src/MethodList.gs +130 -0
- data/public/src/ObjectLog.gs +73 -0
- data/public/src/Server.gs +544 -0
- data/public/src/SessionList.gs +172 -0
- data/public/src/SharedPageCache.gs +66 -0
- data/public/src/StatProcess.gs +280 -0
- data/public/src/StatProcessType.gs +242 -0
- data/public/src/StatStatistic.gs +381 -0
- data/public/src/Statistics.gs +222 -0
- data/public/src/Statmonitor.gs +490 -0
- data/public/src/Tool.gs +86 -0
- data/public/src/VersionReport.gs +52 -0
- data/public/src/Workspace.gs +163 -0
- data/views/debugger.rhtml +6 -9
- metadata +344 -243
- data/lib/web_tools/#debugger.rb# +0 -212
- data/lib/web_tools/browser.rb +0 -45
- data/public/images/favicon.ico +0 -0
- data/public/javascript/CodeMirror/LICENSE +0 -23
- data/public/javascript/CodeMirror/css/Smalltalk.css +0 -34
- data/public/javascript/CodeMirror/js/codemirror.js +0 -582
- data/public/javascript/CodeMirror/js/editor.js +0 -1671
- data/public/javascript/CodeMirror/js/highlight.js +0 -68
- data/public/javascript/CodeMirror/js/parseSmalltalk.js +0 -126
- data/public/javascript/CodeMirror/js/parsedummy.js +0 -32
- data/public/javascript/CodeMirror/js/select.js +0 -699
- data/public/javascript/CodeMirror/js/stringstream.js +0 -159
- data/public/javascript/CodeMirror/js/tokenize.js +0 -57
- data/public/javascript/CodeMirror/js/undo.js +0 -413
- data/public/javascript/CodeMirror/js/util.js +0 -133
- data/public/javascript/CodeMirror/testSmalltalkParser.html +0 -116
- data/public/javascript/ace/ace-uncompressed.js +0 -17299
- data/public/javascript/ace/ace.js +0 -1
- data/public/javascript/ace/keybinding-emacs.js +0 -1
- data/public/javascript/ace/keybinding-vim.js +0 -1
- data/public/javascript/ace/mode-c_cpp.js +0 -1
- data/public/javascript/ace/mode-clojure.js +0 -1
- data/public/javascript/ace/mode-coffee.js +0 -1
- data/public/javascript/ace/mode-csharp.js +0 -1
- data/public/javascript/ace/mode-css.js +0 -1
- data/public/javascript/ace/mode-groovy.js +0 -1
- data/public/javascript/ace/mode-html.js +0 -1
- data/public/javascript/ace/mode-java.js +0 -1
- data/public/javascript/ace/mode-javascript.js +0 -1
- data/public/javascript/ace/mode-json.js +0 -1
- data/public/javascript/ace/mode-lua.js +0 -1
- data/public/javascript/ace/mode-markdown.js +0 -1
- data/public/javascript/ace/mode-ocaml.js +0 -1
- data/public/javascript/ace/mode-perl.js +0 -1
- data/public/javascript/ace/mode-php.js +0 -1
- data/public/javascript/ace/mode-python.js +0 -1
- data/public/javascript/ace/mode-ruby.js +0 -1
- data/public/javascript/ace/mode-scad.js +0 -1
- data/public/javascript/ace/mode-scala.js +0 -1
- data/public/javascript/ace/mode-scss.js +0 -1
- data/public/javascript/ace/mode-svg.js +0 -1
- data/public/javascript/ace/mode-textile.js +0 -1
- data/public/javascript/ace/mode-xml.js +0 -1
- data/public/javascript/ace/theme-clouds.js +0 -1
- data/public/javascript/ace/theme-clouds_midnight.js +0 -1
- data/public/javascript/ace/theme-cobalt.js +0 -1
- data/public/javascript/ace/theme-crimson_editor.js +0 -1
- data/public/javascript/ace/theme-dawn.js +0 -1
- data/public/javascript/ace/theme-eclipse.js +0 -1
- data/public/javascript/ace/theme-idle_fingers.js +0 -1
- data/public/javascript/ace/theme-kr_theme.js +0 -1
- data/public/javascript/ace/theme-merbivore.js +0 -1
- data/public/javascript/ace/theme-merbivore_soft.js +0 -1
- data/public/javascript/ace/theme-mono_industrial.js +0 -1
- data/public/javascript/ace/theme-monokai.js +0 -1
- data/public/javascript/ace/theme-pastel_on_dark.js +0 -1
- data/public/javascript/ace/theme-solarized_dark.js +0 -1
- data/public/javascript/ace/theme-solarized_light.js +0 -1
- data/public/javascript/ace/theme-textmate.js +0 -1
- data/public/javascript/ace/theme-twilight.js +0 -1
- data/public/javascript/ace/theme-vibrant_ink.js +0 -1
- data/public/javascript/ace/worker-coffee.js +0 -1
- data/public/javascript/ace/worker-css.js +0 -1
- data/public/javascript/ace/worker-javascript.js +0 -1
- data/public/javascript/webtools/browser.js +0 -260
- data/public/javascript/webtools/debugger.coffee +0 -286
- data/public/javascript/webtools/debugger.js +0 -366
- data/public/javascript/webtools/sessions.coffee +0 -17
- data/public/javascript/webtools/sessions.js +0 -27
- data/public/javascript/webtools/version.coffee +0 -14
- data/public/javascript/webtools/version.js +0 -20
- data/public/stylesheets/jquery.contextMenu.css +0 -62
- data/public/stylesheets/webtools.css +0 -53
- data/public/test.html +0 -47
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
doit
|
|
2
|
+
Object subclass: 'StatProcessType'
|
|
3
|
+
instVarNames: #( statmon name id
|
|
4
|
+
stats processes)
|
|
5
|
+
classVars: #()
|
|
6
|
+
classInstVars: #()
|
|
7
|
+
poolDictionaries: #()
|
|
8
|
+
inDictionary: WebTools
|
|
9
|
+
options: #()
|
|
10
|
+
|
|
11
|
+
%
|
|
12
|
+
|
|
13
|
+
! Remove existing behavior from StatProcessType
|
|
14
|
+
doit
|
|
15
|
+
StatProcessType removeAllMethods.
|
|
16
|
+
StatProcessType class removeAllMethods.
|
|
17
|
+
%
|
|
18
|
+
! ------------------- Class methods for StatProcessType
|
|
19
|
+
category: 'instance creation'
|
|
20
|
+
set compile_env: 0
|
|
21
|
+
classmethod: StatProcessType
|
|
22
|
+
fromString: aString statmon: aStatmonitor
|
|
23
|
+
|
|
24
|
+
^self new
|
|
25
|
+
initialize: aString;
|
|
26
|
+
statmon: aStatmonitor;
|
|
27
|
+
yourself.
|
|
28
|
+
%
|
|
29
|
+
! ------------------- Instance methods for StatProcessType
|
|
30
|
+
category: 'accessing'
|
|
31
|
+
set compile_env: 0
|
|
32
|
+
method: StatProcessType
|
|
33
|
+
firstBeginTime
|
|
34
|
+
|
|
35
|
+
| result |
|
|
36
|
+
processes do: [:each |
|
|
37
|
+
| next |
|
|
38
|
+
next := each beginTime.
|
|
39
|
+
(result isNil or: [next < result]) ifTrue: [result := next].
|
|
40
|
+
].
|
|
41
|
+
^result.
|
|
42
|
+
|
|
43
|
+
%
|
|
44
|
+
category: 'testing'
|
|
45
|
+
set compile_env: 0
|
|
46
|
+
method: StatProcessType
|
|
47
|
+
hasAnySelections
|
|
48
|
+
|
|
49
|
+
^processes anySatisfy: [:each | each hasAnySelections].
|
|
50
|
+
%
|
|
51
|
+
category: 'accessing'
|
|
52
|
+
set compile_env: 0
|
|
53
|
+
method: StatProcessType
|
|
54
|
+
id
|
|
55
|
+
|
|
56
|
+
^id.
|
|
57
|
+
|
|
58
|
+
%
|
|
59
|
+
category: 'initialize'
|
|
60
|
+
set compile_env: 0
|
|
61
|
+
method: StatProcessType
|
|
62
|
+
initialize: aString
|
|
63
|
+
|
|
64
|
+
| stream next offset |
|
|
65
|
+
stream := ReadStreamLegacy on: aString.
|
|
66
|
+
name := stream skipSeparators; nextWord.
|
|
67
|
+
(next := stream nextWord) = '(' ifFalse: [self error: 'Invalid StatType format: ' , aString printString].
|
|
68
|
+
stats := OrderedCollection new.
|
|
69
|
+
offset := 0.
|
|
70
|
+
[
|
|
71
|
+
(next := stream nextWord) = ')'.
|
|
72
|
+
] whileFalse: [
|
|
73
|
+
offset := offset + 1.
|
|
74
|
+
stats add: (StatStatistic new
|
|
75
|
+
name: next;
|
|
76
|
+
processType: self;
|
|
77
|
+
offset: offset;
|
|
78
|
+
yourself).
|
|
79
|
+
].
|
|
80
|
+
id := self mapID: stream nextWord asNumber.
|
|
81
|
+
processes := Dictionary new.
|
|
82
|
+
%
|
|
83
|
+
category: 'testing'
|
|
84
|
+
set compile_env: 0
|
|
85
|
+
method: StatProcessType
|
|
86
|
+
isGem
|
|
87
|
+
|
|
88
|
+
^name = 'Gem'.
|
|
89
|
+
%
|
|
90
|
+
category: 'testing'
|
|
91
|
+
set compile_env: 0
|
|
92
|
+
method: StatProcessType
|
|
93
|
+
isSharedPageCacheMonitor
|
|
94
|
+
|
|
95
|
+
^name = 'Shrpc'.
|
|
96
|
+
%
|
|
97
|
+
category: 'testing'
|
|
98
|
+
set compile_env: 0
|
|
99
|
+
method: StatProcessType
|
|
100
|
+
isStone
|
|
101
|
+
|
|
102
|
+
^name = 'Stn'.
|
|
103
|
+
%
|
|
104
|
+
category: 'accessing'
|
|
105
|
+
set compile_env: 0
|
|
106
|
+
method: StatProcessType
|
|
107
|
+
lastEndTime
|
|
108
|
+
|
|
109
|
+
| result |
|
|
110
|
+
processes do: [:each |
|
|
111
|
+
| next |
|
|
112
|
+
next := each endTime.
|
|
113
|
+
(result isNil or: [result < next]) ifTrue: [result := next].
|
|
114
|
+
].
|
|
115
|
+
^result.
|
|
116
|
+
|
|
117
|
+
%
|
|
118
|
+
category: 'initialize'
|
|
119
|
+
set compile_env: 0
|
|
120
|
+
method: StatProcessType
|
|
121
|
+
mapID: anInteger
|
|
122
|
+
|
|
123
|
+
^anInteger.
|
|
124
|
+
"
|
|
125
|
+
^(Dictionary new
|
|
126
|
+
at: 0 put: 1;
|
|
127
|
+
at: 1 put: 2;
|
|
128
|
+
at: 2 put: 4;
|
|
129
|
+
at: 3 put: 8;
|
|
130
|
+
at: 4 put: 16;
|
|
131
|
+
at: 5 put: 32;
|
|
132
|
+
yourself)
|
|
133
|
+
at: anInteger
|
|
134
|
+
ifAbsent: [anInteger].
|
|
135
|
+
"
|
|
136
|
+
%
|
|
137
|
+
category: 'accessing'
|
|
138
|
+
set compile_env: 0
|
|
139
|
+
method: StatProcessType
|
|
140
|
+
name
|
|
141
|
+
|
|
142
|
+
^name.
|
|
143
|
+
|
|
144
|
+
%
|
|
145
|
+
category: 'accessing'
|
|
146
|
+
set compile_env: 0
|
|
147
|
+
method: StatProcessType
|
|
148
|
+
numberOfProcesses
|
|
149
|
+
|
|
150
|
+
^processes size.
|
|
151
|
+
|
|
152
|
+
%
|
|
153
|
+
category: 'accessing'
|
|
154
|
+
set compile_env: 0
|
|
155
|
+
method: StatProcessType
|
|
156
|
+
numberOfSamples
|
|
157
|
+
|
|
158
|
+
^stats size.
|
|
159
|
+
|
|
160
|
+
%
|
|
161
|
+
category: 'printing'
|
|
162
|
+
set compile_env: 0
|
|
163
|
+
method: StatProcessType
|
|
164
|
+
printOn: aStream
|
|
165
|
+
|
|
166
|
+
aStream nextPutAll: name.
|
|
167
|
+
%
|
|
168
|
+
category: 'accessing'
|
|
169
|
+
set compile_env: 0
|
|
170
|
+
method: StatProcessType
|
|
171
|
+
processes
|
|
172
|
+
|
|
173
|
+
^processes asSortedCollection: [:a :b | a name <= b name].
|
|
174
|
+
%
|
|
175
|
+
category: 'private'
|
|
176
|
+
set compile_env: 0
|
|
177
|
+
method: StatProcessType
|
|
178
|
+
sanitize
|
|
179
|
+
|
|
180
|
+
| process |
|
|
181
|
+
(name = 'Stn' and: [processes includesKey: 'ta1v6stone']) ifTrue: [
|
|
182
|
+
process := processes at: 'ta1v6stone'.
|
|
183
|
+
processes removeKey: 'ta1v6stone'.
|
|
184
|
+
processes at: 'gs32stone' put: process.
|
|
185
|
+
].
|
|
186
|
+
(name = 'SolarisSystem' and: [processes includesKey: 'psun2001']) ifTrue: [
|
|
187
|
+
process := processes at: 'psun2001'.
|
|
188
|
+
processes removeKey: 'psun2001'.
|
|
189
|
+
processes at: 'psun2001' put: process.
|
|
190
|
+
].
|
|
191
|
+
processes do: [:each | each sanitize].
|
|
192
|
+
%
|
|
193
|
+
category: 'accessing'
|
|
194
|
+
set compile_env: 0
|
|
195
|
+
method: StatProcessType
|
|
196
|
+
statistics
|
|
197
|
+
|
|
198
|
+
^stats "asSortedCollection: [:a :b | a offset <= b offset]".
|
|
199
|
+
%
|
|
200
|
+
category: 'accessing'
|
|
201
|
+
set compile_env: 0
|
|
202
|
+
method: StatProcessType
|
|
203
|
+
statmon
|
|
204
|
+
|
|
205
|
+
^statmon.
|
|
206
|
+
%
|
|
207
|
+
category: 'accessing'
|
|
208
|
+
set compile_env: 0
|
|
209
|
+
method: StatProcessType
|
|
210
|
+
statmon: aStatmonitor
|
|
211
|
+
|
|
212
|
+
statmon := aStatmonitor.
|
|
213
|
+
%
|
|
214
|
+
category: 'initialize'
|
|
215
|
+
set compile_env: 0
|
|
216
|
+
method: StatProcessType
|
|
217
|
+
summarizeLine: anArray
|
|
218
|
+
|
|
219
|
+
| processName process list |
|
|
220
|
+
processName := anArray at: 3.
|
|
221
|
+
process := processes
|
|
222
|
+
at: processName
|
|
223
|
+
ifAbsent: [nil].
|
|
224
|
+
process notNil ifTrue: [
|
|
225
|
+
process updateFrom: anArray.
|
|
226
|
+
^self.
|
|
227
|
+
].
|
|
228
|
+
"OrderedCollection of StatSummary instances; copied so each process has its own"
|
|
229
|
+
list := self statistics collect: [:each | each copy].
|
|
230
|
+
list := list copyFrom: 6 to: list size.
|
|
231
|
+
process := StatProcess new
|
|
232
|
+
type: self;
|
|
233
|
+
stats: list;
|
|
234
|
+
initializeFrom: anArray;
|
|
235
|
+
yourself.
|
|
236
|
+
processes
|
|
237
|
+
at: processName
|
|
238
|
+
put: process.
|
|
239
|
+
%
|
|
240
|
+
doit
|
|
241
|
+
StatProcessType category: 'Statmonitor'
|
|
242
|
+
%
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
doit
|
|
2
|
+
Object subclass: 'StatStatistic'
|
|
3
|
+
instVarNames: #( name processType type
|
|
4
|
+
offset process isCounter level
|
|
5
|
+
units description data min
|
|
6
|
+
minTime max maxTime sum)
|
|
7
|
+
classVars: #()
|
|
8
|
+
classInstVars: #()
|
|
9
|
+
poolDictionaries: #()
|
|
10
|
+
inDictionary: WebTools
|
|
11
|
+
options: #()
|
|
12
|
+
|
|
13
|
+
%
|
|
14
|
+
|
|
15
|
+
! Remove existing behavior from StatStatistic
|
|
16
|
+
doit
|
|
17
|
+
StatStatistic removeAllMethods.
|
|
18
|
+
StatStatistic class removeAllMethods.
|
|
19
|
+
%
|
|
20
|
+
! ------------------- Class methods for StatStatistic
|
|
21
|
+
category: 'cache'
|
|
22
|
+
set compile_env: 0
|
|
23
|
+
classmethod: StatStatistic
|
|
24
|
+
cacheStatDescriptions
|
|
25
|
+
"
|
|
26
|
+
StatStatistic cacheStatDescriptions.
|
|
27
|
+
|
|
28
|
+
A Dictionary where the key is a String (the name of a statistic) and the value is an Array:
|
|
29
|
+
1. description
|
|
30
|
+
2. type - is one of the following: 'counter' 'uvalue' 'svalue' 'float'
|
|
31
|
+
3. level - is one of the following: 'common' 'advanced' 'wizard'
|
|
32
|
+
4. units - is a string that describes what the stat measures. Try to use the same unit string of other stats.
|
|
33
|
+
5. isOs - is 'true' if the statistic comes from the operating system and is 'false' if not."
|
|
34
|
+
|
|
35
|
+
^WebTools
|
|
36
|
+
at: #'CacheStat-Descriptions'
|
|
37
|
+
ifAbsentPut: [self _stats].
|
|
38
|
+
%
|
|
39
|
+
category: 'cache'
|
|
40
|
+
set compile_env: 0
|
|
41
|
+
classmethod: StatStatistic
|
|
42
|
+
clearCache
|
|
43
|
+
"
|
|
44
|
+
StatStatistic clearCache.
|
|
45
|
+
"
|
|
46
|
+
WebTools
|
|
47
|
+
removeKey: #'CacheStat-Descriptions' ifAbsent: [];
|
|
48
|
+
yourself.
|
|
49
|
+
%
|
|
50
|
+
category: 'cache'
|
|
51
|
+
set compile_env: 0
|
|
52
|
+
classmethod: StatStatistic
|
|
53
|
+
_stats
|
|
54
|
+
|
|
55
|
+
| gsFile stream line stats string i |
|
|
56
|
+
gsFile := GsFile openReadOnServer: '$GEMSTONE/bin/vsd'.
|
|
57
|
+
[
|
|
58
|
+
[
|
|
59
|
+
line := gsFile nextLine.
|
|
60
|
+
line notNil and: [line ~= 'array set statDocs {
|
|
61
|
+
'].
|
|
62
|
+
] whileTrue: [].
|
|
63
|
+
stream := WriteStream on: String new.
|
|
64
|
+
[
|
|
65
|
+
(line := gsFile nextLine) = 'array set vsdhelp {
|
|
66
|
+
'.
|
|
67
|
+
] whileFalse: [
|
|
68
|
+
stream nextPutAll: line.
|
|
69
|
+
].
|
|
70
|
+
] ensure: [
|
|
71
|
+
gsFile close.
|
|
72
|
+
].
|
|
73
|
+
stream := ReadStream on: stream contents.
|
|
74
|
+
stats := Dictionary new.
|
|
75
|
+
[
|
|
76
|
+
string := stream upTo: $}.
|
|
77
|
+
0 < (i := string indexOf: ${).
|
|
78
|
+
] whileTrue: [
|
|
79
|
+
| array |
|
|
80
|
+
string := string copyFrom: i + 1 to: string size.
|
|
81
|
+
array := Array new: 5.
|
|
82
|
+
stats at: string put: array.
|
|
83
|
+
string := stream upTo: $"; upTo: $".
|
|
84
|
+
string := string collect: [:each | each = $\ ifTrue: [Character lf] ifFalse: [each]].
|
|
85
|
+
array at: 1 put: string.
|
|
86
|
+
].
|
|
87
|
+
1 to: 47 do: [:i |
|
|
88
|
+
stats at: 'SessionStat' , i printString put: (stats at: 'SessionStat0' ) copy.
|
|
89
|
+
stats at: 'VMStat' , i printString put: (stats at: 'VMStat0' ) copy.
|
|
90
|
+
stats at: 'GlobalStat' , i printString put: (stats at: 'GlobalStat0' ) copy.
|
|
91
|
+
].
|
|
92
|
+
0 to: 10 do: [:i |
|
|
93
|
+
stats at: 'sharedCounter' , i printString put: (stats at: 'sharedCounter' ) copy.
|
|
94
|
+
].
|
|
95
|
+
[
|
|
96
|
+
stream atEnd or: [(line := stream nextLine) = 'array set statDefinitions {'].
|
|
97
|
+
] whileFalse: [].
|
|
98
|
+
[
|
|
99
|
+
string := (stream upTo: ${) trimSeparators.
|
|
100
|
+
string isEmpty.
|
|
101
|
+
] whileTrue: [
|
|
102
|
+
| array values |
|
|
103
|
+
array := stats
|
|
104
|
+
at: (stream upTo: $})
|
|
105
|
+
ifAbsentPut: [#('' nil nil nil nil) copy].
|
|
106
|
+
values := ReadStream on: (stream upTo: ${; upTo: $}).
|
|
107
|
+
2 to: 5 do: [:i |
|
|
108
|
+
string := values upTo: ((values peekFor: $")
|
|
109
|
+
ifTrue: [$"]
|
|
110
|
+
ifFalse: [$ ]).
|
|
111
|
+
array at: i put: string asSymbol.
|
|
112
|
+
].
|
|
113
|
+
].
|
|
114
|
+
stats do: [:each |
|
|
115
|
+
each
|
|
116
|
+
at: 5
|
|
117
|
+
put: (each at: 5) = #'true'.
|
|
118
|
+
].
|
|
119
|
+
stream := nil.
|
|
120
|
+
^stats.
|
|
121
|
+
%
|
|
122
|
+
! ------------------- Instance methods for StatStatistic
|
|
123
|
+
category: 'accessors'
|
|
124
|
+
set compile_env: 0
|
|
125
|
+
method: StatStatistic
|
|
126
|
+
data
|
|
127
|
+
|
|
128
|
+
^data.
|
|
129
|
+
|
|
130
|
+
%
|
|
131
|
+
category: 'accessors'
|
|
132
|
+
set compile_env: 0
|
|
133
|
+
method: StatStatistic
|
|
134
|
+
description
|
|
135
|
+
|
|
136
|
+
^description.
|
|
137
|
+
%
|
|
138
|
+
category: 'accessors'
|
|
139
|
+
set compile_env: 0
|
|
140
|
+
method: StatStatistic
|
|
141
|
+
flotData
|
|
142
|
+
|
|
143
|
+
| tzOffset timeList result |
|
|
144
|
+
tzOffset := processType statmon timeZoneOffset.
|
|
145
|
+
timeList := process timeList.
|
|
146
|
+
result := OrderedCollection new.
|
|
147
|
+
type == #'counter' ifTrue: [
|
|
148
|
+
| priorTime priorValue newTime newValue rate |
|
|
149
|
+
priorTime := timeList at: 1.
|
|
150
|
+
priorValue := data at: 1.
|
|
151
|
+
2 to: (timeList size min: data size) do: [:i |
|
|
152
|
+
newTime := timeList at: i.
|
|
153
|
+
newValue := data at: i.
|
|
154
|
+
rate := (newValue - priorValue) / (newTime - priorTime).
|
|
155
|
+
result add: (Array with: newTime + tzOffset * 1000 with: rate).
|
|
156
|
+
priorTime := newTime.
|
|
157
|
+
priorValue := newValue.
|
|
158
|
+
].
|
|
159
|
+
] ifFalse: [
|
|
160
|
+
1 to: (timeList size min: data size) do: [:i |
|
|
161
|
+
result add: (Array with: (timeList at: i) + tzOffset * 1000 with: (data at: i)).
|
|
162
|
+
].
|
|
163
|
+
].
|
|
164
|
+
^result.
|
|
165
|
+
%
|
|
166
|
+
category: 'initialize'
|
|
167
|
+
set compile_env: 0
|
|
168
|
+
method: StatStatistic
|
|
169
|
+
initialize: anArray
|
|
170
|
+
|
|
171
|
+
| struct value |
|
|
172
|
+
struct := self class cacheStatDescriptions
|
|
173
|
+
at: name
|
|
174
|
+
ifAbsent: [nil].
|
|
175
|
+
isCounter := false.
|
|
176
|
+
level := ''.
|
|
177
|
+
units := ''.
|
|
178
|
+
struct notNil ifTrue: [
|
|
179
|
+
description := struct at: 1.
|
|
180
|
+
type := struct at: 2.
|
|
181
|
+
isCounter := type == #'counter'.
|
|
182
|
+
level := struct at: 3.
|
|
183
|
+
units := struct at: 4.
|
|
184
|
+
].
|
|
185
|
+
value := self valueOf: (anArray at: offset).
|
|
186
|
+
data := OrderedCollection with: value.
|
|
187
|
+
minTime := anArray at: 2.
|
|
188
|
+
min := value.
|
|
189
|
+
max := value.
|
|
190
|
+
sum := value.
|
|
191
|
+
maxTime := minTime.
|
|
192
|
+
%
|
|
193
|
+
category: 'accessors'
|
|
194
|
+
set compile_env: 0
|
|
195
|
+
method: StatStatistic
|
|
196
|
+
isCounter
|
|
197
|
+
|
|
198
|
+
^isCounter.
|
|
199
|
+
|
|
200
|
+
%
|
|
201
|
+
category: 'accessors'
|
|
202
|
+
set compile_env: 0
|
|
203
|
+
method: StatStatistic
|
|
204
|
+
level
|
|
205
|
+
|
|
206
|
+
^level.
|
|
207
|
+
|
|
208
|
+
%
|
|
209
|
+
category: 'accessors'
|
|
210
|
+
set compile_env: 0
|
|
211
|
+
method: StatStatistic
|
|
212
|
+
max
|
|
213
|
+
|
|
214
|
+
^max.
|
|
215
|
+
|
|
216
|
+
%
|
|
217
|
+
category: 'accessors'
|
|
218
|
+
set compile_env: 0
|
|
219
|
+
method: StatStatistic
|
|
220
|
+
maxTime
|
|
221
|
+
|
|
222
|
+
^self statmon timeStampFromSeconds: maxTime.
|
|
223
|
+
|
|
224
|
+
%
|
|
225
|
+
category: 'accessors'
|
|
226
|
+
set compile_env: 0
|
|
227
|
+
method: StatStatistic
|
|
228
|
+
mean
|
|
229
|
+
|
|
230
|
+
^sum / data size.
|
|
231
|
+
%
|
|
232
|
+
category: 'accessors'
|
|
233
|
+
set compile_env: 0
|
|
234
|
+
method: StatStatistic
|
|
235
|
+
min
|
|
236
|
+
|
|
237
|
+
^min.
|
|
238
|
+
|
|
239
|
+
%
|
|
240
|
+
category: 'accessors'
|
|
241
|
+
set compile_env: 0
|
|
242
|
+
method: StatStatistic
|
|
243
|
+
minTime
|
|
244
|
+
|
|
245
|
+
^self statmon timeStampFromSeconds: minTime.
|
|
246
|
+
|
|
247
|
+
%
|
|
248
|
+
category: 'accessors'
|
|
249
|
+
set compile_env: 0
|
|
250
|
+
method: StatStatistic
|
|
251
|
+
name
|
|
252
|
+
|
|
253
|
+
^name.
|
|
254
|
+
%
|
|
255
|
+
category: 'initialize'
|
|
256
|
+
set compile_env: 0
|
|
257
|
+
method: StatStatistic
|
|
258
|
+
name: anObject
|
|
259
|
+
name := anObject
|
|
260
|
+
%
|
|
261
|
+
category: 'accessors'
|
|
262
|
+
set compile_env: 0
|
|
263
|
+
method: StatStatistic
|
|
264
|
+
offset
|
|
265
|
+
|
|
266
|
+
^offset.
|
|
267
|
+
|
|
268
|
+
%
|
|
269
|
+
category: 'initialize'
|
|
270
|
+
set compile_env: 0
|
|
271
|
+
method: StatStatistic
|
|
272
|
+
offset: anObject
|
|
273
|
+
offset := anObject
|
|
274
|
+
%
|
|
275
|
+
category: 'printing'
|
|
276
|
+
set compile_env: 0
|
|
277
|
+
method: StatStatistic
|
|
278
|
+
printOn: aStream
|
|
279
|
+
|
|
280
|
+
aStream nextPutAll: name.
|
|
281
|
+
%
|
|
282
|
+
category: 'accessors'
|
|
283
|
+
set compile_env: 0
|
|
284
|
+
method: StatStatistic
|
|
285
|
+
process
|
|
286
|
+
|
|
287
|
+
^process.
|
|
288
|
+
%
|
|
289
|
+
category: 'initialize'
|
|
290
|
+
set compile_env: 0
|
|
291
|
+
method: StatStatistic
|
|
292
|
+
process: anObject
|
|
293
|
+
process := anObject
|
|
294
|
+
%
|
|
295
|
+
category: 'initialize'
|
|
296
|
+
set compile_env: 0
|
|
297
|
+
method: StatStatistic
|
|
298
|
+
processType: anObject
|
|
299
|
+
processType := anObject
|
|
300
|
+
%
|
|
301
|
+
category: 'accessors'
|
|
302
|
+
set compile_env: 0
|
|
303
|
+
method: StatStatistic
|
|
304
|
+
rate
|
|
305
|
+
|
|
306
|
+
^data last - data first / process seconds.
|
|
307
|
+
%
|
|
308
|
+
category: 'accessors'
|
|
309
|
+
set compile_env: 0
|
|
310
|
+
method: StatStatistic
|
|
311
|
+
statmon
|
|
312
|
+
|
|
313
|
+
^process statmon.
|
|
314
|
+
|
|
315
|
+
%
|
|
316
|
+
category: 'accessors'
|
|
317
|
+
set compile_env: 0
|
|
318
|
+
method: StatStatistic
|
|
319
|
+
type
|
|
320
|
+
|
|
321
|
+
^type.
|
|
322
|
+
%
|
|
323
|
+
category: 'accessors'
|
|
324
|
+
set compile_env: 0
|
|
325
|
+
method: StatStatistic
|
|
326
|
+
units
|
|
327
|
+
|
|
328
|
+
^units.
|
|
329
|
+
|
|
330
|
+
%
|
|
331
|
+
category: 'initialize'
|
|
332
|
+
set compile_env: 0
|
|
333
|
+
method: StatStatistic
|
|
334
|
+
updateFrom: anArray
|
|
335
|
+
|
|
336
|
+
| value |
|
|
337
|
+
offset <= 3 ifTrue: [^self].
|
|
338
|
+
anArray size < offset ifTrue: [^self].
|
|
339
|
+
value := self valueOf: (anArray at: offset).
|
|
340
|
+
data add: value.
|
|
341
|
+
data last < min ifTrue: [
|
|
342
|
+
min := value.
|
|
343
|
+
minTime := anArray at: 2.
|
|
344
|
+
].
|
|
345
|
+
max < data last ifTrue: [
|
|
346
|
+
max := value.
|
|
347
|
+
maxTime := anArray at: 2.
|
|
348
|
+
].
|
|
349
|
+
sum := sum + value.
|
|
350
|
+
%
|
|
351
|
+
category: 'initialize'
|
|
352
|
+
set compile_env: 0
|
|
353
|
+
method: StatStatistic
|
|
354
|
+
valueOf: anObject
|
|
355
|
+
|
|
356
|
+
| bytes |
|
|
357
|
+
type == #'float' ifTrue: [
|
|
358
|
+
bytes := ByteArray new: 4.
|
|
359
|
+
bytes unsigned32At: 1 put: anObject.
|
|
360
|
+
^bytes floatAt: 1.
|
|
361
|
+
].
|
|
362
|
+
(type == #'svalue' and: [16rEFFFFFFF < anObject]) ifTrue: [
|
|
363
|
+
bytes := ByteArray new: 4.
|
|
364
|
+
bytes unsigned32At: 1 put: anObject.
|
|
365
|
+
^bytes signed32At: 1.
|
|
366
|
+
].
|
|
367
|
+
(type == #'uvalue' and: [anObject < 0]) ifTrue: [
|
|
368
|
+
bytes := ByteArray new: 4.
|
|
369
|
+
bytes signed32At: 1 put: anObject.
|
|
370
|
+
^bytes unsigned32At: 1.
|
|
371
|
+
].
|
|
372
|
+
(type == #'counter' and: [anObject < 0]) ifTrue: [
|
|
373
|
+
bytes := ByteArray new: 4.
|
|
374
|
+
bytes signed32At: 1 put: anObject.
|
|
375
|
+
^bytes unsigned32At: 1.
|
|
376
|
+
].
|
|
377
|
+
^anObject.
|
|
378
|
+
%
|
|
379
|
+
doit
|
|
380
|
+
StatStatistic category: 'Statmonitor'
|
|
381
|
+
%
|