Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tinchodias/pharo-sauco-profiler

Another UI for Pharo profiler tools
https://github.com/tinchodias/pharo-sauco-profiler

pharo profiler

Last synced: 24 days ago
JSON representation

Another UI for Pharo profiler tools

Awesome Lists containing this project

README

        

# Sauco Profiler

[![Test](https://github.com/tinchodias/pharo-sauco-profiler/actions/workflows/test.yml/badge.svg)](https://github.com/tinchodias/pharo-sauco-profiler/actions/workflows/test.yml)

A tool to help in the comprehension of profilers' output, in Pharo.

This project provides:
- A model to aggregate the tally information from the `MessageTally` and `AndreasSystemProfiler` (See `SaMethodNode`, `SaBehaviorNode` and `SaCategoryNode`).
- Spec2 inspectors provide means to explore the model.
- Color mappings for the model and visualizations, such as a [flame graph](https://github.com/brendangregg/FlameGraph), which is a kind of non-radial [Sunburst](https://www.data-to-viz.com/graph/sunburst.html). The intention is easing comprehension of the tally nodes output. See captures below.

## Screenshots

| Tally Tree | Behaviors (Classes, Metaclasses, Traits |
:-----------:|:---------------------------------------:|
TallyTree | Classes

| Flame Graph (macro view) | Flame Graph (zoomed view) | Color Mapping by category |
:-------------------------:|:-------------------------:|:--------------------------:
| SkiaMacro | CairoDetail | Legend |

## Install

In a Pharo 10 (Should work in 9.0, too)
* First: Manually load full [Roassal3](https://github.com/ObjectProfile/Roassal3) via World Menu -> Library -> Roassal3 -> Load full version (This will load `Roassal3-FlameGraph` package, a dependency).
* Second: Evaluate the following script:
~~~smalltalk
Metacello new
baseline: 'SaucoPerfMeter';
repository: 'github://tinchodias/pharo-sauco-profiler';
load.
~~~

## How to Use

You can find several examples oof use in class-side of `SaReport`, such as:
```Smalltalk
SaReport exampleUUID
```

But you can just place code to profile in a block closure and inspect the `SaReport` like:
```Smalltalk
SaReport newWithASPOn: [
| array |
array := FLSerializer serializeToByteArray: Smalltalk ui icons.
FLMaterializer materializeFromByteArray: array ]
```

## License

The code is licensed under [MIT](LICENSE).

## What is the *sauco* word?

Sauco is a name of [a tree](https://es.wikipedia.org/wiki/Sambucus_australis). One of the variants has fruits like these:

![Fruits](https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Sambucus_nigra2.jpg/320px-Sambucus_nigra2.jpg)