Skip to content

Cache should log all actions to Tracy #58

Description

@janbarasek

Sometimes I need debug application performance and I want detect how many time and how many requests cache must do.

Imagine something like this panel:

Snímek obrazovky 2020-02-04 v 14 16 44

I think logging process should be implemented in Storage like low-level operation and specific Storage should implement logging proces.

In specific Storage can be array like this:

private $log = [
   [ // sample record. By default will be empty array
      'action' => 'read',
      'key' => 'article-list',
      'params' => [],
      'time' => 24.7
   ]
];

public function getLog(): array {
   return $this->log;
}

In Tracy I can read current IStorage and get list of actions by optional public getter.

I can implement it for native package storages.

What do you think? Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions