-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1dc05b4
commit f80446d
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,29 @@ | ||
# ObjectStatistics | ||
A tool to analyse set of objects by computing different kind of metrics and look at them from different angles | ||
ObjectStatistics is tool to analyse set of objects by computing different kind of metrics and look at them from different angles. | ||
|
||
Imaging that we have collection of message sends and we want to know number of message sends in dimension of receiver, receiver class and message selector. We have different angles to look at this data: from receiver class to selector and receiver or from selector to receiver class and receiver or any other combination. | ||
|
||
We also could analyze different kind of metrics which could be computed on given objects. It could be number of unique receivers, execution time, executed lines of code, etc. | ||
|
||
This package implements computation of object statistics over declared metrics and dimensions space. | ||
|
||
Described example could be look like: | ||
```Smalltalk | ||
stat := ObjectStatistics new. | ||
stat | ||
countAllAs: 'sends'; | ||
countDifferent: [ :message | message receiver ] as: 'instances'. | ||
stat | ||
dimension: [ :message | message receiver class ] named: 'classes'; | ||
with: [ | ||
stat dimension: [ :message | message selector ] named: 'msgs'; | ||
with: [ | ||
stat dimension: [ :r | r ] named: 'receivers']]; | ||
dimension: [ :message | message selector ] named: 'msgs'; | ||
with: [ | ||
stat dimension: [ :message | message receiver class ] named: 'classes'; | ||
with: [ | ||
stat dimension: [ :r | r ] named: 'receivers']]. | ||
stat accumulateAll: messageSends | ||
``` |