author | Claus Gittinger <cg@exept.de> |
Fri, 25 Mar 2016 22:51:52 +0100 | |
changeset 641 | 542aa9db84a0 |
parent 639 | ed6e926776b7 |
child 645 | 4fdd7ae6c84a |
permissions | -rw-r--r-- |
509 | 1 |
" |
2 |
COPYRIGHT (c) 2012 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
"{ Package: 'stx:goodies/sunit' }" |
|
13 |
||
604 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
509 | 16 |
Object subclass:#MetricsReporter |
17 |
instanceVariableNames:'packages stream classMetricNames methodMetricNames |
|
18 |
packageMetricNames' |
|
639 | 19 |
classVariableNames:'DefaultClassMetricNames DefaultMethodMetricNames |
20 |
DefaultPackageMetricNames' |
|
509 | 21 |
poolDictionaries:'' |
584
aab981776647
Moved to category "SUnit-Smalltalk/X-Report" as it is St/X-specific (and mostly obsolete)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
568
diff
changeset
|
22 |
category:'SUnit-Smalltalk/X-Report' |
509 | 23 |
! |
24 |
||
635 | 25 |
Object subclass:#MetricInfo |
26 |
instanceVariableNames:'shortName longName metricValue errorMessage' |
|
27 |
classVariableNames:'' |
|
28 |
poolDictionaries:'' |
|
29 |
privateIn:MetricsReporter |
|
30 |
! |
|
31 |
||
509 | 32 |
!MetricsReporter class methodsFor:'documentation'! |
33 |
||
34 |
copyright |
|
35 |
" |
|
36 |
COPYRIGHT (c) 2012 by eXept Software AG |
|
37 |
All Rights Reserved |
|
38 |
||
39 |
This software is furnished under a license and may be used |
|
40 |
only in accordance with the terms of that license and with the |
|
41 |
inclusion of the above copyright notice. This software may not |
|
42 |
be provided or otherwise made available to, or used by, any |
|
43 |
other person. No title to or ownership of the software is |
|
44 |
hereby transferred. |
|
45 |
||
46 |
" |
|
47 |
! |
|
48 |
||
49 |
documentation |
|
50 |
" |
|
51 |
this is used as a last step in jenkins automated builds. |
|
52 |
||
53 |
Currently supported formats are: |
|
54 |
#xml_metrics - a java metrics compatible format |
|
55 |
||
639 | 56 |
By default, the following metrics are generated: |
57 |
per method: |
|
58 |
none |
|
59 |
||
60 |
per class: |
|
61 |
LOC (lines of code) |
|
62 |
||
63 |
per package: |
|
64 |
LOC (lines of code) |
|
65 |
NOC (number of classes) |
|
66 |
||
509 | 67 |
[author:] |
68 |
Claus Gittinger |
|
69 |
||
70 |
[see also:] |
|
71 |
" |
|
72 |
! |
|
73 |
||
74 |
examples |
|
75 |
" |
|
76 |
[exBegin] |
|
639 | 77 |
MetricsReporter |
78 |
reportPackages:{ 'stx:libjavascript' } |
|
79 |
format:#xml_metrics |
|
80 |
on:Transcript. |
|
81 |
[exEnd] |
|
82 |
||
83 |
[exBegin] |
|
568 | 84 |
String streamContents:[:stream | |
85 |
MetricsReporter |
|
86 |
reportPackages:{ 'stx:libjavascript' } |
|
87 |
format:#xml_metrics |
|
88 |
on:stream. |
|
89 |
]. |
|
90 |
[exEnd] |
|
91 |
[exBegin] |
|
92 |
String streamContents:[:stream | |
|
93 |
MetricsReporter |
|
94 |
reportPackages:{ 'stx:libbasic*' } |
|
95 |
format:#xml_metrics |
|
96 |
on:stream. |
|
97 |
]. |
|
98 |
[exEnd] |
|
99 |
[exBegin] |
|
509 | 100 |
'metrics.xml' asFilename writingFileDo:[:stream | |
568 | 101 |
MetricsReporter |
102 |
reportPackages:{ 'stx:libjavascript' } |
|
103 |
format:#xml_metrics |
|
104 |
on:stream. |
|
509 | 105 |
]. |
106 |
[exEnd] |
|
107 |
||
108 |
[exBegin] |
|
109 |
'metrics.xml' asFilename writingFileDo:[:stream | |
|
110 |
MetricsReporter |
|
111 |
reportPackages: |
|
112 |
{ |
|
113 |
'exept:workflow' |
|
114 |
'exept:expecco' |
|
115 |
'exept:expecco/plugins/*' |
|
116 |
} |
|
117 |
format:#xml_metrics |
|
118 |
on:stream. |
|
119 |
]. |
|
120 |
[exEnd] |
|
522 | 121 |
|
568 | 122 |
package metrics only: |
522 | 123 |
[exBegin] |
124 |
MetricsReporter new |
|
125 |
stream: Transcript; |
|
126 |
packages: |
|
127 |
{ |
|
128 |
'exept:workflow' . |
|
129 |
'exept:expecco' . |
|
130 |
}; |
|
131 |
classMetricNames: #(); |
|
132 |
methodMetricNames: #(); |
|
133 |
packageMetricNames: #( 'LOC' 'NOM' 'NOC'); |
|
134 |
reportXml_metrics. |
|
135 |
[exEnd] |
|
568 | 136 |
[exBegin] |
137 |
MetricsReporter new |
|
138 |
stream: Transcript; |
|
139 |
packages: |
|
140 |
{ |
|
141 |
'stx:libbasic' . |
|
142 |
'stx:libbasic2' . |
|
143 |
'stx:libbasic3' . |
|
144 |
}; |
|
145 |
classMetricNames: #(); |
|
146 |
methodMetricNames: #(); |
|
147 |
packageMetricNames: #( 'LOC' 'NOM' 'NOC'); |
|
639 | 148 |
report. |
568 | 149 |
[exEnd] |
150 |
[exBegin] |
|
151 |
MetricsReporter new |
|
152 |
stream: Transcript; |
|
153 |
packages: |
|
154 |
{ |
|
155 |
'stx:libbasic*' . |
|
156 |
}; |
|
157 |
classMetricNames: #(); |
|
158 |
methodMetricNames: #(); |
|
159 |
packageMetricNames: #( 'LOC' 'NOM' 'NOC'); |
|
639 | 160 |
report. |
568 | 161 |
[exEnd] |
162 |
[exBegin] |
|
163 |
MetricsReporter new |
|
164 |
stream: Transcript; |
|
165 |
packages: |
|
166 |
{ |
|
167 |
'stx:*' . |
|
168 |
}; |
|
169 |
classMetricNames: #(); |
|
170 |
methodMetricNames: #(); |
|
171 |
packageMetricNames: #( 'LOC' 'NOM' 'NOC'); |
|
639 | 172 |
report. |
173 |
[exEnd] |
|
174 |
||
175 |
Number of methods without comment (NMWNC): |
|
176 |
[exBegin] |
|
177 |
MetricsReporter new |
|
178 |
stream: Transcript; |
|
179 |
packages: |
|
180 |
{ |
|
181 |
'stx:libbasic' . |
|
182 |
}; |
|
183 |
classMetricNames: #(); |
|
184 |
methodMetricNames: #(); |
|
185 |
packageMetricNames: #( 'NOM' 'NMWNC'); |
|
186 |
report. |
|
568 | 187 |
[exEnd] |
509 | 188 |
" |
189 |
! |
|
190 |
||
191 |
format_metrics |
|
192 |
" |
|
193 |
<?xml version=""1.0"" encoding=""UTF-8"" ?> |
|
194 |
||
195 |
<!!ELEMENT metrics (project)* > |
|
196 |
<!!ELEMENT project (name, measurement*, group*) > |
|
197 |
<!!ELEMENT group (name, measurement*, class*) > |
|
198 |
<!!ELEMENT class (name, measurement*, method*) > |
|
199 |
<!!ELEMENT method (name, measurement*) > |
|
200 |
<!!ELEMENT name (#PCDATA) > |
|
201 |
<!!ELEMENT measurement (short-name, long-name, value, (members? | (minimum, median, average, standard-deviation, maximum, sum, nb-data-points))) > |
|
202 |
<!!ELEMENT short-name (#PCDATA) > |
|
203 |
<!!ELEMENT long-name (#PCDATA) > |
|
204 |
<!!ELEMENT value (#PCDATA) > |
|
205 |
<!!ELEMENT members (member*) > |
|
206 |
<!!ELEMENT minimum (#PCDATA) > |
|
207 |
<!!ELEMENT median (#PCDATA) > |
|
208 |
<!!ELEMENT average (#PCDATA) > |
|
209 |
<!!ELEMENT standard-deviation (#PCDATA) > |
|
210 |
<!!ELEMENT maximum (#PCDATA) > |
|
211 |
<!!ELEMENT sum (#PCDATA) > |
|
212 |
<!!ELEMENT nb-data-points (#PCDATA) > |
|
213 |
<!!ELEMENT member (#PCDATA) > |
|
214 |
" |
|
215 |
! ! |
|
216 |
||
639 | 217 |
!MetricsReporter class methodsFor:'defaults'! |
218 |
||
219 |
defaultClassMetricNames |
|
220 |
^ DefaultClassMetricNames ? #( 'NOM' 'LOC' ) |
|
221 |
! |
|
222 |
||
223 |
defaultMethodMetricNames |
|
224 |
^ DefaultMethodMetricNames ? #( "'LOC'" ) |
|
225 |
! |
|
226 |
||
227 |
defaultPackageMetricNames |
|
228 |
^ DefaultPackageMetricNames ? #( 'LOC' 'NOC' 'NOM') |
|
229 |
! ! |
|
230 |
||
509 | 231 |
!MetricsReporter class methodsFor:'queries'! |
232 |
||
233 |
supportedFormats |
|
234 |
"return a list of formats and short-info-string, as per supported format symbol" |
|
235 |
||
236 |
^ #( |
|
237 |
(#'xml_metrics' 'xml format') |
|
238 |
) |
|
239 |
||
240 |
"Created: / 30-07-2011 / 10:18:18 / cg" |
|
241 |
! ! |
|
242 |
||
243 |
!MetricsReporter class methodsFor:'reporting'! |
|
244 |
||
639 | 245 |
reportPackages: aCollectionOfPackages format: formatSymbol on: aStream |
509 | 246 |
self new |
639 | 247 |
reportPackages: aCollectionOfPackages format: formatSymbol on: aStream |
248 |
||
249 |
" |
|
250 |
MetricsReporter |
|
251 |
reportPackages:{ 'stx:libbasic' . 'stx:libbasic2' } |
|
252 |
format:#xml_metrics |
|
253 |
on:Transcript. |
|
254 |
" |
|
255 |
! |
|
256 |
||
257 |
reportSummaryForPackages: aCollectionOfPackages format: aSymbol on: aStream |
|
258 |
self new |
|
259 |
classMetricNames:#(); |
|
260 |
methodMetricNames:#(); |
|
261 |
reportPackages: aCollectionOfPackages format: aSymbol on: aStream |
|
262 |
||
263 |
" |
|
264 |
MetricsReporter |
|
265 |
reportSummaryForPackages:{ 'stx:libbasic' . 'stx:libbasic2' } |
|
266 |
format:#xml_metrics |
|
267 |
on:Transcript. |
|
268 |
" |
|
509 | 269 |
! ! |
270 |
||
271 |
!MetricsReporter methodsFor:'accessing'! |
|
272 |
||
273 |
classMetricNames |
|
639 | 274 |
^ classMetricNames ? (self class defaultClassMetricNames) |
509 | 275 |
! |
276 |
||
639 | 277 |
classMetricNames:aCollectionOfNames |
278 |
"to overwrite the set of class metrics, which are to be measured and reported" |
|
279 |
||
280 |
classMetricNames := aCollectionOfNames. |
|
521 | 281 |
! |
282 |
||
509 | 283 |
methodMetricNames |
639 | 284 |
^ methodMetricNames ? (self class defaultMethodMetricNames ) |
509 | 285 |
! |
286 |
||
639 | 287 |
methodMetricNames:aCollectionOfNames |
288 |
"to overwrite the set of method metrics, which are to be measured and reported" |
|
289 |
||
290 |
methodMetricNames := aCollectionOfNames. |
|
521 | 291 |
! |
292 |
||
509 | 293 |
packageMetricNames |
639 | 294 |
^ packageMetricNames ? self class defaultPackageMetricNames |
509 | 295 |
! |
296 |
||
639 | 297 |
packageMetricNames:aCollectionOfNames |
298 |
"to overwrite the set of package metrics, which are to be measured and reported" |
|
299 |
||
300 |
packageMetricNames := aCollectionOfNames. |
|
521 | 301 |
! |
302 |
||
639 | 303 |
packages:aCollectionOfPackages |
304 |
"defines the packages, for which a report is generated" |
|
305 |
||
306 |
packages := aCollectionOfPackages. |
|
509 | 307 |
! |
308 |
||
639 | 309 |
stream:aWriteStream |
310 |
"sets the stream onto which the report is written" |
|
311 |
||
312 |
stream := aWriteStream. |
|
509 | 313 |
! ! |
314 |
||
315 |
!MetricsReporter methodsFor:'metric generation'! |
|
316 |
||
317 |
classMetricValue:metricName for:aClass |
|
318 |
|metric| |
|
319 |
||
320 |
metric := OOM::ClassMetrics type:metricName for:aClass. |
|
321 |
^ self metricInfoFor:metric |
|
322 |
! |
|
323 |
||
324 |
methodMetricValue:metricName for:aMethod |
|
325 |
|metric| |
|
326 |
||
327 |
metric := OOM::MethodMetrics type:metricName for:aMethod. |
|
328 |
^ self metricInfoFor:metric |
|
329 |
! |
|
330 |
||
331 |
metricInfoFor:metric |
|
635 | 332 |
|metricValue errorMessageOrNil| |
333 |
||
631 | 334 |
Error handle:[:ex | |
635 | 335 |
metricValue := 0. |
336 |
errorMessageOrNil := ex description. |
|
631 | 337 |
] do:[ |
635 | 338 |
metricValue := metric metricValue |
631 | 339 |
]. |
635 | 340 |
^ MetricInfo new |
341 |
shortName:metric class shortName |
|
342 |
longName:metric class descriptiveName |
|
343 |
metricValue:metricValue |
|
344 |
errorMessage:errorMessageOrNil |
|
509 | 345 |
! |
346 |
||
568 | 347 |
packageMetricValue:metricName for:aPackageIDOrPattern |
348 |
|overAllInfo| |
|
349 |
||
635 | 350 |
aPackageIDOrPattern includesMatchCharacters ifFalse:[ |
351 |
^ self metricInfoFor:(OOM::PackageMetrics type:metricName for:aPackageIDOrPattern). |
|
352 |
]. |
|
353 |
||
641 | 354 |
Smalltalk allPackageIDs do:[:eachPackageID | |
635 | 355 |
|thisInfo| |
509 | 356 |
|
635 | 357 |
(eachPackageID matches:aPackageIDOrPattern) ifTrue:[ |
358 |
thisInfo := self metricInfoFor:(OOM::PackageMetrics type:metricName for:eachPackageID). |
|
359 |
overAllInfo isNil ifTrue:[ |
|
360 |
overAllInfo := thisInfo |
|
361 |
] ifFalse:[ |
|
362 |
"/ kludge: only works with accumulative metrics (i.e. not with averages etc.) |
|
363 |
overAllInfo metricValue:(overAllInfo metricValue + thisInfo metricValue). |
|
568 | 364 |
]. |
365 |
]. |
|
366 |
]. |
|
635 | 367 |
^ overAllInfo |
509 | 368 |
! ! |
369 |
||
370 |
!MetricsReporter methodsFor:'reporting'! |
|
371 |
||
639 | 372 |
report |
373 |
"report in the default format, which is the currently only supported format, |
|
374 |
xml_metrics" |
|
375 |
||
376 |
self report:#xml_metrics |
|
377 |
! |
|
378 |
||
379 |
report:formatSymbol |
|
380 |
"formatSymbol controls, in what format the report is written. |
|
381 |
currently supported formatSymbols: |
|
382 |
xml_metrics" |
|
383 |
||
384 |
|reportFormatSelector| |
|
385 |
||
386 |
reportFormatSelector := self reportFormatSelector:formatSymbol. |
|
387 |
(self respondsTo: reportFormatSelector) |
|
388 |
ifTrue:[self perform: reportFormatSelector] |
|
389 |
ifFalse:[self error:'Unsupported format: ', formatSymbol]. |
|
390 |
||
391 |
"Modified (comment): / 03-08-2011 / 12:57:54 / cg" |
|
392 |
! |
|
393 |
||
509 | 394 |
reportPackages: aCollectionOfPackages format: aSymbol on: aStream |
395 |
||
396 |
packages := aCollectionOfPackages. |
|
397 |
stream := aStream. |
|
398 |
self report: aSymbol |
|
639 | 399 |
|
400 |
" |
|
401 |
MetricsReporter |
|
402 |
reportPackages:{ 'stx:libbasic' . 'stx:libbasic2' } |
|
403 |
format:#xml_metrics |
|
404 |
on:Transcript. |
|
405 |
" |
|
509 | 406 |
! ! |
407 |
||
408 |
!MetricsReporter methodsFor:'reporting - xml-metrics'! |
|
409 |
||
410 |
generateClassMetricsFor:aClass |
|
411 |
^ self classMetricNames collect:[:metricName | |
|
412 |
self classMetricValue:metricName for:aClass. |
|
413 |
]. |
|
414 |
! |
|
415 |
||
416 |
generateMethodMetricsFor:aMethod |
|
417 |
^ self methodMetricNames collect:[:metricName | |
|
418 |
self methodMetricValue:metricName for:aMethod. |
|
419 |
]. |
|
420 |
! |
|
421 |
||
568 | 422 |
generatePackageMetricsFor:aPackageIDOrPattern |
509 | 423 |
^ self packageMetricNames collect:[:metricName | |
568 | 424 |
self packageMetricValue:metricName for:aPackageIDOrPattern. |
509 | 425 |
]. |
426 |
! |
|
427 |
||
428 |
reportXml_metricValues:metricValues |
|
631 | 429 |
|metricShortName metricLongName metricValue possibleErrorMessage| |
509 | 430 |
|
635 | 431 |
metricValues do:[:eachMetricInfo | |
432 |
metricShortName := eachMetricInfo shortName. |
|
433 |
metricLongName := eachMetricInfo longName. |
|
434 |
metricValue := eachMetricInfo metricValue. |
|
435 |
possibleErrorMessage := eachMetricInfo errorMessage. |
|
631 | 436 |
possibleErrorMessage notNil ifTrue:[ |
437 |
metricLongName := metricLongName , '(Error: ',possibleErrorMessage,')'. |
|
438 |
]. |
|
509 | 439 |
|
440 |
stream nextPutLine: ' <measurement>'. |
|
441 |
stream nextPutLine: (' <short-name>%1</short-name>' bindWith:metricShortName). |
|
442 |
stream nextPutLine: (' <long-name>%1</long-name>' bindWith:metricLongName). |
|
443 |
stream nextPutLine: (' <value>%1</value>' bindWith:metricValue). |
|
444 |
stream nextPutLine: ' </measurement>'. |
|
445 |
] |
|
446 |
! |
|
447 |
||
448 |
reportXml_metrics |
|
632 | 449 |
"invoked via perform, if the formatSymbol is #xml_metrics" |
450 |
||
509 | 451 |
" |
452 |
self new |
|
453 |
stream:Transcript; |
|
454 |
packages:#( 'exept:workflow' ); |
|
455 |
reportXml_metrics |
|
456 |
" |
|
457 |
||
568 | 458 |
"/ need the exept-metrics package |
586 | 459 |
Smalltalk loadPackage:'exept:programming/oom'. |
509 | 460 |
|
632 | 461 |
packages do:[:eachPackageID | |
462 |
"/ if the package is a matchPattern, generate metrics for all loaded packages |
|
463 |
"/ which match that pattern. |
|
464 |
"/ Otherwise, make sure that this package is loaded and generate metrics for that |
|
465 |
"/ one only. |
|
466 |
eachPackageID includesMatchCharacters ifFalse:[ |
|
467 |
Smalltalk loadPackage:eachPackageID. |
|
468 |
]. |
|
469 |
]. |
|
470 |
||
509 | 471 |
stream nextPutLine: '<?xml version="1.0"?>'; |
472 |
nextPutLine: '<metrics>'. |
|
473 |
||
474 |
packages do:[:eachPackageID | |
|
568 | 475 |
"/ if the package is a matchPattern, generate metrics for all loaded packages |
476 |
"/ which match that pattern. |
|
477 |
"/ Otherwise, make sure that this package is loaded and generate metrics for that |
|
478 |
"/ one only. |
|
509 | 479 |
self reportXml_metricsForPackage:eachPackageID |
480 |
]. |
|
481 |
stream nextPutLine: '</metrics>'. |
|
482 |
! |
|
483 |
||
484 |
reportXml_metricsForClass:aClass |
|
485 |
stream nextPutLine: ' <class>'. |
|
486 |
stream nextPutLine: (' <name>%1</name>' bindWith:aClass name). |
|
487 |
||
488 |
self methodMetricNames notEmptyOrNil ifTrue:[ |
|
489 |
aClass instAndClassMethodsDo:[:eachMethod | |
|
490 |
self reportXml_metricsForMethod:eachMethod |
|
491 |
]. |
|
492 |
]. |
|
493 |
||
519 | 494 |
self classMetricNames notEmptyOrNil ifTrue:[ |
495 |
self reportXml_metricValues:(self generateClassMetricsFor:aClass). |
|
496 |
]. |
|
497 |
||
509 | 498 |
stream nextPutLine: ' </class>'. |
499 |
! |
|
500 |
||
501 |
reportXml_metricsForMethod:aMethod |
|
502 |
stream nextPutLine: ' <method>'. |
|
503 |
stream nextPutLine:(' <name>%1</name>' bindWith:aMethod selector). |
|
504 |
||
505 |
self reportXml_metricValues:(self generateMethodMetricsFor:aMethod). |
|
506 |
||
507 |
stream nextPutLine: ' </method>'. |
|
508 |
! |
|
509 |
||
568 | 510 |
reportXml_metricsForPackage:aPackageIDOrPattern |
511 |
|genMetricsForClass| |
|
512 |
||
513 |
genMetricsForClass := |
|
514 |
[:aClass | |
|
515 |
Autoload autoloadFailedSignal handle:[:ex | |
|
516 |
] do:[ |
|
517 |
aClass autoload. |
|
518 |
self reportXml_metricsForClass:aClass |
|
519 |
] |
|
520 |
]. |
|
521 |
||
509 | 522 |
stream nextPutLine: ' <project>'. |
568 | 523 |
stream nextPutLine: (' <name>%1</name>' bindWith:aPackageIDOrPattern). |
509 | 524 |
|
525 |
(self classMetricNames notEmptyOrNil |
|
526 |
or:[self methodMetricNames notEmptyOrNil]) ifTrue:[ |
|
568 | 527 |
aPackageIDOrPattern includesMatchCharacters ifTrue:[ |
528 |
Smalltalk allClasses do:[:eachClass | |
|
633 | 529 |
(eachClass package matches:aPackageIDOrPattern) ifTrue:[ |
568 | 530 |
genMetricsForClass value:eachClass |
531 |
]. |
|
509 | 532 |
]. |
568 | 533 |
] ifFalse:[ |
534 |
Smalltalk allClassesInPackage:aPackageIDOrPattern do:genMetricsForClass. |
|
509 | 535 |
]. |
536 |
]. |
|
537 |
||
568 | 538 |
self reportXml_metricValues:(self generatePackageMetricsFor:aPackageIDOrPattern). |
519 | 539 |
|
509 | 540 |
stream nextPutLine: ' </project>'. |
541 |
! ! |
|
542 |
||
543 |
!MetricsReporter methodsFor:'reporting-private'! |
|
544 |
||
545 |
reportFormatSelector:format |
|
604 | 546 |
^ ('report' , format asString asUppercaseFirst) asSymbol |
509 | 547 |
! ! |
548 |
||
635 | 549 |
!MetricsReporter::MetricInfo methodsFor:'accessing'! |
550 |
||
551 |
errorMessage |
|
552 |
^ errorMessage |
|
553 |
! |
|
554 |
||
555 |
errorMessage:something |
|
556 |
errorMessage := something. |
|
557 |
! |
|
558 |
||
559 |
longName |
|
560 |
^ longName |
|
561 |
! |
|
562 |
||
563 |
longName:something |
|
564 |
longName := something. |
|
565 |
! |
|
566 |
||
567 |
metricValue |
|
568 |
^ metricValue |
|
569 |
! |
|
570 |
||
571 |
metricValue:aNumber |
|
572 |
metricValue := aNumber. |
|
573 |
! |
|
574 |
||
575 |
shortName |
|
576 |
^ shortName |
|
577 |
! |
|
578 |
||
579 |
shortName:something |
|
580 |
shortName := something. |
|
581 |
! |
|
582 |
||
583 |
shortName:shortNameArg longName:longNameArg metricValue:valueArg errorMessage:errorMessageArg |
|
584 |
shortName := shortNameArg. |
|
585 |
longName := longNameArg. |
|
586 |
metricValue := valueArg. |
|
587 |
errorMessage := errorMessageArg. |
|
588 |
! ! |
|
589 |
||
509 | 590 |
!MetricsReporter class methodsFor:'documentation'! |
591 |
||
592 |
version |
|
631 | 593 |
^ '$Header$' |
509 | 594 |
! |
595 |
||
596 |
version_CVS |
|
631 | 597 |
^ '$Header$' |
509 | 598 |
! ! |
568 | 599 |