maglev-webtools 0.2.1 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,172 @@
|
|
1
|
+
doit
|
2
|
+
Tool subclass: 'SessionList'
|
3
|
+
instVarNames: #()
|
4
|
+
classVars: #()
|
5
|
+
classInstVars: #()
|
6
|
+
poolDictionaries: #()
|
7
|
+
inDictionary: WebTools
|
8
|
+
options: #()
|
9
|
+
|
10
|
+
%
|
11
|
+
|
12
|
+
! Remove existing behavior from SessionList
|
13
|
+
doit
|
14
|
+
SessionList removeAllMethods.
|
15
|
+
SessionList class removeAllMethods.
|
16
|
+
%
|
17
|
+
! ------------------- Class methods for SessionList
|
18
|
+
category: 'other'
|
19
|
+
set compile_env: 0
|
20
|
+
classmethod: SessionList
|
21
|
+
description
|
22
|
+
|
23
|
+
^'Information about current sessions and other processes'.
|
24
|
+
%
|
25
|
+
category: 'other'
|
26
|
+
set compile_env: 0
|
27
|
+
classmethod: SessionList
|
28
|
+
displayName
|
29
|
+
|
30
|
+
^'Current Sessions'.
|
31
|
+
%
|
32
|
+
category: 'other'
|
33
|
+
set compile_env: 0
|
34
|
+
classmethod: SessionList
|
35
|
+
sortOrder
|
36
|
+
|
37
|
+
^2.
|
38
|
+
%
|
39
|
+
! ------------------- Instance methods for SessionList
|
40
|
+
category: 'Public'
|
41
|
+
set compile_env: 0
|
42
|
+
method: SessionList
|
43
|
+
cacheDescription
|
44
|
+
|
45
|
+
| name cache details |
|
46
|
+
name := arguments at: 'name' ifAbsent: [self error: 'Name not provided!'].
|
47
|
+
cache := StatStatistic cacheStatDescriptions.
|
48
|
+
details := cache
|
49
|
+
at: name
|
50
|
+
ifAbsent: [Array with: 'No description available for ' , name , '!'].
|
51
|
+
^Dictionary new
|
52
|
+
at: 'description' put: details first;
|
53
|
+
yourself.
|
54
|
+
%
|
55
|
+
category: 'Public'
|
56
|
+
set compile_env: 0
|
57
|
+
method: SessionList
|
58
|
+
json
|
59
|
+
|
60
|
+
^Dictionary new
|
61
|
+
at: 'labels' put: self _sessionListLabels;
|
62
|
+
at: 'sessions' put: self _sessionList;
|
63
|
+
at: 'other' put: self _nonSessionList;
|
64
|
+
yourself.
|
65
|
+
%
|
66
|
+
category: 'Public'
|
67
|
+
set compile_env: 0
|
68
|
+
method: SessionList
|
69
|
+
statsForSlot
|
70
|
+
|
71
|
+
| slot descriptions statistics result topFour bytes |
|
72
|
+
slot := arguments at: 'slot' ifAbsent: [self error: 'No slot argument!'].
|
73
|
+
(statistics := System cacheStatisticsAt: slot asNumber) isNil ifTrue: [self error: 'Process slot not in use (gem has logged out?)!'].
|
74
|
+
descriptions := System cacheStatisticsDescriptionForType: (statistics at: 4).
|
75
|
+
result := OrderedCollection new.
|
76
|
+
bytes := ByteArray new: 8.
|
77
|
+
1 to: descriptions size do: [:i |
|
78
|
+
| name metadata |
|
79
|
+
name := descriptions at: i.
|
80
|
+
metadata := StatStatistic cacheStatDescriptions at: name ifAbsent: [#('' '' '' '' '')].
|
81
|
+
result add: (Dictionary new
|
82
|
+
at: 'name' put: name;
|
83
|
+
at: 'type' put: (metadata at: 2);
|
84
|
+
at: 'level' put: (metadata at: 3);
|
85
|
+
at: 'units' put: (metadata at: 4);
|
86
|
+
at: 'isOs' put: (metadata at: 5);
|
87
|
+
at: 'value' put: (statistics at: i);
|
88
|
+
yourself).
|
89
|
+
].
|
90
|
+
topFour := result copyFrom: 1 to: 4.
|
91
|
+
result := result copyFrom: 5 to: descriptions size.
|
92
|
+
result := result asSortedCollection: [:a :b | (a at: 'name') <= (b at: 'name')].
|
93
|
+
result := topFour , result asArray.
|
94
|
+
^Dictionary new
|
95
|
+
at: 'stats' put: result;
|
96
|
+
yourself.
|
97
|
+
%
|
98
|
+
category: 'Private'
|
99
|
+
set compile_env: 0
|
100
|
+
method: SessionList
|
101
|
+
_nonSessionList
|
102
|
+
|
103
|
+
| slots |
|
104
|
+
[
|
105
|
+
| sessions slot |
|
106
|
+
sessions := System currentSessions.
|
107
|
+
slots := OrderedCollection new.
|
108
|
+
slot := 0.
|
109
|
+
[true] whileTrue: [
|
110
|
+
| array |
|
111
|
+
array := System cacheStatistics: slot.
|
112
|
+
(sessions includes: (array at: 3)) ifFalse: [
|
113
|
+
slots add: (Array with: slot with: array first).
|
114
|
+
].
|
115
|
+
slot := slot + 1.
|
116
|
+
].
|
117
|
+
] on: Error do: [:ex |
|
118
|
+
^slots.
|
119
|
+
].
|
120
|
+
%
|
121
|
+
category: 'Private'
|
122
|
+
set compile_env: 0
|
123
|
+
method: SessionList
|
124
|
+
_sessionList
|
125
|
+
|
126
|
+
| sessions now |
|
127
|
+
sessions := System currentSessions collect: [:each | (System descriptionOfSession: each) , (Array with: (System cacheSlotForSessionId: each))].
|
128
|
+
sessions := sessions reject: [:each | each isNil].
|
129
|
+
now := System timeGmt. "seconds since January 1, 1970"
|
130
|
+
sessions := sessions collect: [:list |
|
131
|
+
| x |
|
132
|
+
list
|
133
|
+
at: 1 put: (list at: 1) userId; "UserProfile"
|
134
|
+
at: 4 put: ((x := list at: 4) = 0 ifTrue: [''] ifFalse: [x]); "Primitive"
|
135
|
+
at: 5 put: (now - (list at: 5)) printString , 's'; "View age"
|
136
|
+
at: 7 put: (#('none' 'out' 'in') at: (list at: 7) + 2);
|
137
|
+
at: 14 put: (now - (list at: 14)) printString , 's'; "Quiet"
|
138
|
+
at: 15 put: (now - (list at: 15)) printString , 's'; "Age"
|
139
|
+
yourself.
|
140
|
+
].
|
141
|
+
0 timesRepeat: [sessions := sessions , sessions].
|
142
|
+
^sessions.
|
143
|
+
%
|
144
|
+
category: 'Private'
|
145
|
+
set compile_env: 0
|
146
|
+
method: SessionList
|
147
|
+
_sessionListLabels
|
148
|
+
"See System class>>#'descriptionOfSession:'"
|
149
|
+
|
150
|
+
^(Array new: 17)
|
151
|
+
at: 1 put: 'User' -> 'The UserProfile of the session, or nil if the UserProfile is recently created and not visible from this session''s transactional view, or the session is no longer active.';
|
152
|
+
at: 2 put: 'PID' -> 'The process ID of the Gem process of the session.';
|
153
|
+
at: 3 put: 'Host' -> 'The hostname of the machine running the Gem process (a String, limited to 127 bytes).';
|
154
|
+
at: 4 put: 'Prim' -> 'Primitive number in which the Gem is executing (if it is executing in a long primitive such as MFC).';
|
155
|
+
at: 5 put: 'View Age' -> 'Time since the session''s most recent beginTransaction, commitTransaction, or abortTransaction.';
|
156
|
+
at: 6 put: 'State' -> 'The session state (an enum from SesTaskStatusEType in session.ht).';
|
157
|
+
at: 7 put: 'Trans' -> 'One of the following: ''none'' if the session is in transactionless mode, ''out'' if it is not in a transaction, and ''in'' if it is in a transaction.';
|
158
|
+
at: 8 put: 'Oldest CR' -> 'A Boolean whose value is true if the session is currently referencing the oldest commit record, and false if it is not.';
|
159
|
+
at: 9 put: 'Serial' -> 'The session''s serial number. A serial number will not be reused until the stone is restarted.';
|
160
|
+
at: 10 put: 'Session' -> ('The session''s sessionId. The configured maximum is ' , System maxSessionId printString , ' for this stone.');
|
161
|
+
at: 11 put: 'GCI IP' -> 'A String containing the ip address of host running the GCI process. If the GCI application is linked (using libgcilnk*.so or gcilnk*.dll) this ip address is the address of the machine running the gem process.';
|
162
|
+
at: 12 put: 'Priority' -> 'The priority of the session where 0 is lowest, 2 is normal, and 4 is highest. Session priority is used by the stone to order requests for service by sessions.';
|
163
|
+
at: 13 put: 'Host ID' -> 'Unique host ID of the host where the session is running.';
|
164
|
+
at: 14 put: 'Quiet' -> 'Time since the session''s most recent request to stone.';
|
165
|
+
at: 15 put: 'Age' -> 'Time since the session logged in.';
|
166
|
+
at: 16 put: 'CRB' -> 'Commit Record Backlog: number of commits which have occurred since the session obtained its view.';
|
167
|
+
at: 17 put: 'Slot' -> 'The session''s cache process slot number if it is connected to the same shared page cache as Server. A return of nil indicates the session could not be located (so the gem is likely on another host).';
|
168
|
+
yourself.
|
169
|
+
%
|
170
|
+
doit
|
171
|
+
SessionList category: 'WebTools'
|
172
|
+
%
|
@@ -0,0 +1,66 @@
|
|
1
|
+
doit
|
2
|
+
Tool subclass: 'SharedPageCache'
|
3
|
+
instVarNames: #()
|
4
|
+
classVars: #()
|
5
|
+
classInstVars: #()
|
6
|
+
poolDictionaries: #()
|
7
|
+
inDictionary: WebTools
|
8
|
+
options: #()
|
9
|
+
|
10
|
+
%
|
11
|
+
|
12
|
+
! Remove existing behavior from SharedPageCache
|
13
|
+
doit
|
14
|
+
SharedPageCache removeAllMethods.
|
15
|
+
SharedPageCache class removeAllMethods.
|
16
|
+
%
|
17
|
+
! ------------------- Class methods for SharedPageCache
|
18
|
+
category: 'other'
|
19
|
+
set compile_env: 0
|
20
|
+
classmethod: SharedPageCache
|
21
|
+
description
|
22
|
+
|
23
|
+
^'Information about the Shared Page Cache'.
|
24
|
+
%
|
25
|
+
category: 'other'
|
26
|
+
set compile_env: 0
|
27
|
+
classmethod: SharedPageCache
|
28
|
+
displayName
|
29
|
+
|
30
|
+
^'Shared Page Cache'.
|
31
|
+
%
|
32
|
+
category: 'other'
|
33
|
+
set compile_env: 0
|
34
|
+
classmethod: SharedPageCache
|
35
|
+
sortOrder
|
36
|
+
|
37
|
+
^7.
|
38
|
+
%
|
39
|
+
! ------------------- Instance methods for SharedPageCache
|
40
|
+
category: 'other'
|
41
|
+
set compile_env: 0
|
42
|
+
method: SharedPageCache
|
43
|
+
json
|
44
|
+
|
45
|
+
| names stats size free globalDirty localDirty |
|
46
|
+
names := System cacheStatisticsDescriptionForMonitor.
|
47
|
+
stats := System sharedPageCacheMonitorCacheStatistics.
|
48
|
+
size := stats at: (names indexOf: 'FrameCount').
|
49
|
+
free := stats at: (names indexOf: 'FreeFrameCount').
|
50
|
+
globalDirty := stats at: (names indexOf: 'GlobalDirtyPageCount').
|
51
|
+
localDirty := stats at: (names indexOf: 'LocalDirtyPageCount').
|
52
|
+
^Dictionary new
|
53
|
+
at: 'objectTable' put: ((stats at: (names indexOf: 'TotalOtPages' )) / size * 100.0) rounded;
|
54
|
+
at: 'bitmap' put: ((stats at: (names indexOf: 'TotalBitmapPages' )) / size * 100.0) rounded;
|
55
|
+
at: 'commitRecord' put: ((stats at: (names indexOf: 'TotalCrPages' )) / size * 100.0) rounded;
|
56
|
+
at: 'other' put: ((stats at: (names indexOf: 'TotalOtherPages' )) / size * 100.0) rounded;
|
57
|
+
at: 'data' put: ((stats at: (names indexOf: 'TotalDataPages' )) / size * 100.0) rounded;
|
58
|
+
at: 'free' put: (free / size * 100.0) rounded;
|
59
|
+
at: 'globalDirty' put: (globalDirty / size * 100.0) rounded;
|
60
|
+
at: 'localDirty' put: (localDirty / size * 100.0) rounded;
|
61
|
+
at: 'clean' put: (size - localDirty - localDirty - free / size * 100.0) rounded;
|
62
|
+
yourself.
|
63
|
+
%
|
64
|
+
doit
|
65
|
+
SharedPageCache category: 'WebTools'
|
66
|
+
%
|
@@ -0,0 +1,280 @@
|
|
1
|
+
doit
|
2
|
+
Object subclass: 'StatProcess'
|
3
|
+
instVarNames: #( type name processID
|
4
|
+
sessionID stats timeList primitives
|
5
|
+
crb)
|
6
|
+
classVars: #( PrimitiveMap)
|
7
|
+
classInstVars: #()
|
8
|
+
poolDictionaries: #()
|
9
|
+
inDictionary: WebTools
|
10
|
+
options: #()
|
11
|
+
|
12
|
+
%
|
13
|
+
|
14
|
+
! Remove existing behavior from StatProcess
|
15
|
+
doit
|
16
|
+
StatProcess removeAllMethods.
|
17
|
+
StatProcess class removeAllMethods.
|
18
|
+
%
|
19
|
+
! ------------------- Class methods for StatProcess
|
20
|
+
! ------------------- Instance methods for StatProcess
|
21
|
+
category: 'accessors'
|
22
|
+
set compile_env: 0
|
23
|
+
method: StatProcess
|
24
|
+
beginSeconds
|
25
|
+
|
26
|
+
^timeList first.
|
27
|
+
%
|
28
|
+
category: 'accessors'
|
29
|
+
set compile_env: 0
|
30
|
+
method: StatProcess
|
31
|
+
beginTime
|
32
|
+
|
33
|
+
^self statmonitor timeStampFromSeconds: self beginSeconds.
|
34
|
+
%
|
35
|
+
category: 'accessors'
|
36
|
+
set compile_env: 0
|
37
|
+
method: StatProcess
|
38
|
+
count
|
39
|
+
|
40
|
+
^timeList size.
|
41
|
+
%
|
42
|
+
category: 'accessors'
|
43
|
+
set compile_env: 0
|
44
|
+
method: StatProcess
|
45
|
+
crb
|
46
|
+
|
47
|
+
^crb.
|
48
|
+
%
|
49
|
+
category: 'accessors'
|
50
|
+
set compile_env: 0
|
51
|
+
method: StatProcess
|
52
|
+
endSeconds
|
53
|
+
|
54
|
+
^timeList last.
|
55
|
+
%
|
56
|
+
category: 'accessors'
|
57
|
+
set compile_env: 0
|
58
|
+
method: StatProcess
|
59
|
+
endTime
|
60
|
+
|
61
|
+
^self statmonitor timeStampFromSeconds: self endSeconds.
|
62
|
+
%
|
63
|
+
category: 'accessors'
|
64
|
+
set compile_env: 0
|
65
|
+
method: StatProcess
|
66
|
+
hasAnySelections
|
67
|
+
|
68
|
+
^stats anySatisfy: [:each | each isSelected].
|
69
|
+
%
|
70
|
+
category: 'initialize'
|
71
|
+
set compile_env: 0
|
72
|
+
method: StatProcess
|
73
|
+
initializeFrom: anArray
|
74
|
+
|
75
|
+
| bytes |
|
76
|
+
crb := Array new.
|
77
|
+
self initializePrimitiveMap.
|
78
|
+
bytes := ByteArray new: 4.
|
79
|
+
timeList := OrderedCollection with: (anArray at: 2).
|
80
|
+
name := anArray at: 3.
|
81
|
+
processID := anArray at: 4.
|
82
|
+
bytes unsigned32At: 1 put: (anArray at: 5).
|
83
|
+
sessionID := bytes signed32At: 1.
|
84
|
+
1 to: stats size do: [:i |
|
85
|
+
(stats at: i)
|
86
|
+
process: self;
|
87
|
+
initialize: anArray;
|
88
|
+
yourself.
|
89
|
+
].
|
90
|
+
%
|
91
|
+
category: 'initialize'
|
92
|
+
set compile_env: 0
|
93
|
+
method: StatProcess
|
94
|
+
initializePrimitiveMap
|
95
|
+
|
96
|
+
PrimitiveMap isNil ifTrue: [
|
97
|
+
PrimitiveMap := Dictionary new
|
98
|
+
at: 392 put: 'audit';
|
99
|
+
at: 394 put: 'backup';
|
100
|
+
at: 395 put: 'restore';
|
101
|
+
at: 876 put: 'MFC';
|
102
|
+
at: 896 put: 'list';
|
103
|
+
at: 899 put: 'refs';
|
104
|
+
yourself.
|
105
|
+
].
|
106
|
+
%
|
107
|
+
category: 'accessors'
|
108
|
+
set compile_env: 0
|
109
|
+
method: StatProcess
|
110
|
+
maxCRB
|
111
|
+
|
112
|
+
crb isEmpty ifTrue: [^0].
|
113
|
+
^crb
|
114
|
+
inject: crb first value
|
115
|
+
into: [:max :each | max max: each value].
|
116
|
+
%
|
117
|
+
category: 'accessors'
|
118
|
+
set compile_env: 0
|
119
|
+
method: StatProcess
|
120
|
+
name
|
121
|
+
|
122
|
+
^name.
|
123
|
+
%
|
124
|
+
category: 'accessors'
|
125
|
+
set compile_env: 0
|
126
|
+
method: StatProcess
|
127
|
+
name: aString
|
128
|
+
|
129
|
+
name := aString.
|
130
|
+
%
|
131
|
+
category: 'accessors'
|
132
|
+
set compile_env: 0
|
133
|
+
method: StatProcess
|
134
|
+
primitives
|
135
|
+
|
136
|
+
primitives notNil ifTrue: [^primitives].
|
137
|
+
primitives := Array new.
|
138
|
+
stats do: [:eachStat |
|
139
|
+
eachStat name = 'PrimitiveNumber' ifTrue: [
|
140
|
+
eachStat data asIdentitySet do: [:each |
|
141
|
+
0 < each ifTrue: [
|
142
|
+
primitives add: each.
|
143
|
+
].
|
144
|
+
].
|
145
|
+
].
|
146
|
+
].
|
147
|
+
primitives := primitives asSortedCollection asArray collect: [:each |
|
148
|
+
PrimitiveMap at: each ifAbsent: [each].
|
149
|
+
].
|
150
|
+
^primitives.
|
151
|
+
%
|
152
|
+
category: 'other'
|
153
|
+
set compile_env: 0
|
154
|
+
method: StatProcess
|
155
|
+
printOn: aStream
|
156
|
+
|
157
|
+
| time |
|
158
|
+
time := self statmonitor timeStampFromSeconds: timeList first.
|
159
|
+
time := time printString.
|
160
|
+
time := time copyFrom: 12 to: 16.
|
161
|
+
aStream
|
162
|
+
nextPutAll: name;
|
163
|
+
nextPutAll: ' (';
|
164
|
+
nextPutAll: time;
|
165
|
+
nextPutAll: ')';
|
166
|
+
yourself.
|
167
|
+
%
|
168
|
+
category: 'accessors'
|
169
|
+
set compile_env: 0
|
170
|
+
method: StatProcess
|
171
|
+
processID
|
172
|
+
|
173
|
+
^processID.
|
174
|
+
%
|
175
|
+
category: 'accessors'
|
176
|
+
set compile_env: 0
|
177
|
+
method: StatProcess
|
178
|
+
samplesSize
|
179
|
+
|
180
|
+
^self count.
|
181
|
+
|
182
|
+
%
|
183
|
+
category: 'private'
|
184
|
+
set compile_env: 0
|
185
|
+
method: StatProcess
|
186
|
+
sanitize
|
187
|
+
|
188
|
+
"timeList := timeList collect: [:each | each + 18000]." "Add five hours to get from ART to PST"
|
189
|
+
type name = 'Stn' ifTrue: [
|
190
|
+
name := 'gs32stone'.
|
191
|
+
].
|
192
|
+
type name = 'SolarisSystem' ifTrue: [
|
193
|
+
name := 'hamburg'.
|
194
|
+
].
|
195
|
+
%
|
196
|
+
category: 'accessors'
|
197
|
+
set compile_env: 0
|
198
|
+
method: StatProcess
|
199
|
+
seconds
|
200
|
+
|
201
|
+
^self endSeconds - self beginSeconds + 1.
|
202
|
+
%
|
203
|
+
category: 'accessors'
|
204
|
+
set compile_env: 0
|
205
|
+
method: StatProcess
|
206
|
+
sessionID
|
207
|
+
|
208
|
+
^sessionID.
|
209
|
+
%
|
210
|
+
category: 'accessors'
|
211
|
+
set compile_env: 0
|
212
|
+
method: StatProcess
|
213
|
+
statistics
|
214
|
+
^stats
|
215
|
+
%
|
216
|
+
category: 'accessors'
|
217
|
+
set compile_env: 0
|
218
|
+
method: StatProcess
|
219
|
+
statmon
|
220
|
+
|
221
|
+
^type statmon.
|
222
|
+
%
|
223
|
+
category: 'accessors'
|
224
|
+
set compile_env: 0
|
225
|
+
method: StatProcess
|
226
|
+
statmonitor
|
227
|
+
|
228
|
+
^type statmon.
|
229
|
+
%
|
230
|
+
category: 'other'
|
231
|
+
set compile_env: 0
|
232
|
+
method: StatProcess
|
233
|
+
statNamed: aString
|
234
|
+
|
235
|
+
^self statistics
|
236
|
+
detect: [:each | each name = aString]
|
237
|
+
ifNone: [nil].
|
238
|
+
%
|
239
|
+
category: 'initialize'
|
240
|
+
set compile_env: 0
|
241
|
+
method: StatProcess
|
242
|
+
stats: anObject
|
243
|
+
"OrderedCollection of StatSummary instances; copied so each process has its own"
|
244
|
+
|
245
|
+
stats := anObject
|
246
|
+
%
|
247
|
+
category: 'accessors'
|
248
|
+
set compile_env: 0
|
249
|
+
method: StatProcess
|
250
|
+
timeList
|
251
|
+
|
252
|
+
^timeList.
|
253
|
+
%
|
254
|
+
category: 'accessors'
|
255
|
+
set compile_env: 0
|
256
|
+
method: StatProcess
|
257
|
+
type
|
258
|
+
|
259
|
+
^type.
|
260
|
+
%
|
261
|
+
category: 'accessors'
|
262
|
+
set compile_env: 0
|
263
|
+
method: StatProcess
|
264
|
+
type: aStatType
|
265
|
+
|
266
|
+
type := aStatType.
|
267
|
+
%
|
268
|
+
category: 'initialize'
|
269
|
+
set compile_env: 0
|
270
|
+
method: StatProcess
|
271
|
+
updateFrom: anArray
|
272
|
+
|
273
|
+
timeList add: (anArray at: 2).
|
274
|
+
1 to: stats size do: [:i |
|
275
|
+
(stats at: i) updateFrom: anArray.
|
276
|
+
].
|
277
|
+
%
|
278
|
+
doit
|
279
|
+
StatProcess category: 'Statmonitor'
|
280
|
+
%
|