Skip to content

Commit

Permalink
Improved class comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanmontt committed Sep 29, 2023
1 parent 34eb2bd commit 247e55e
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/IllimaniProfiler/IllAllocationProfiler.class.st
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
"
I am a Memory Profiler.
I am a Memory Allocation Sites Profiler. I provide information about the allocation sites of the allocated objects of your application. Information such as who is the allocator class, allocator method, the context in where the allocation was made, etc.
I will put a proxy method inside the methods: `basicNew` and `basicNew:` of the Behavior class.
First, you need to specify which classes do you want to capture. For example, let's say that you can to register the allocations of Color objects:
I will ìnstall method proxies inside some allocator methods to capture the allocations
```
profiler := IllimaniAllocationProfiler new.
profiler classesToRegister: { Color }.
```
Or if you want to capture all type of objects
```
profiler captureAllObjects
profiler := IllimaniAllocationProfiler new.
```
To profile a code block:
Expand All @@ -24,10 +16,10 @@ profiler profileOn: [ anObject performSomeAction ]
To monitor the image for a given duration a code block:
```
profiler profileFor: 2 seconds
profiler profileFor: 5 seconds
```
You can open the ui at any time with the message `open`
You can open the ui at any time with the message `open`, even if the profiling is still being made.
```
profiler open
Expand All @@ -44,18 +36,15 @@ Keep in mind that your image can get slow and big. The Pharo image allocate thou
Example 1:
```
IllimaniAllocationProfiler new
copyExecutionStack
classesToRegister: { Rectangle };
IllAllocationProfiler new
profileFor: 3 seconds;
open.
```
Example 2:
```
IllimaniAllocationProfiler new
captureAllObjects;
IllAllocationProfiler new
copyExecutionStack;
profileOn: [ 1000 timesRepeat: [ Object new ] ];
open
Expand Down

0 comments on commit 247e55e

Please sign in to comment.