innmind/silent-cartographer

Library to visualize processes manipulating the operating system

2.2.0 2021-02-14 15:45 UTC

This package is auto-updated.

Last update: 2024-12-15 00:25:01 UTC


README

Build Status codecov Type Coverage

Simple tool to visualize all the operations done on the operating system inside other php applications.

Installation

For the command line tool:

composer global require innmind/silent-cartographer

In the project you want to see operations:

composer require innmind/silent-cartographer

Usage

To watch all activities:

silent-cartographer panel

In your project in order to send activities:

use Innmind\CLI\{
    Main,
    Environment,
};
use Innmind\OperatingSystem\OperatingSystem;
use Innmind\Url\Path;
use function Innmind\SilentCartographer\bootstrap;

new class extends Main {
    protected function main(Environment $env, OperatingSystem $os): void
    {
        $os = bootstrap($os)['cli'](Path::of(__DIR__));
        // then use the $os variable like you would normally do
    }
}

In an HTTP server context use the http_server context (instead of cli), the difference is that if no panel is activated at the reception of a request it will never try to send any activity to the panel for the rest of the request handling (this is done to reduce performance impact).