Pymetrix: An Overview

Pymetrix Developer Docs

Posted by Anuran on Saturday, November 20, 2021

TOC

Codacy Code Grade Github Stars GitHub Forks GitHub Repo Size Lines of Code

How does Pymetrix work?

Pymetrix Visualization Sample

(A sample graph visualization)

Pymetrix basically tries to be an opensource plug-‘n’-play python analytics library. It can be extended with various plugins that can be implemented in a manner I’ve tried to keep as straightforward as possible.

Organization

The Flow Graph: The backbone

Being heavily inspired from Google Analytics, Pymetrix makes use of graphs to denote the entire flow of control, with each node denoting the function (or object) you want to get metrics of. The graph structure also enables you to get metrics of the sequence of execution, so that you can determine UX metrics as well.

The graph and its various elements are represented by the 3 types of Flow Classes in flow.py, as described in the next section.

The Database: The Memo Keeper

The information of the graph, the various operations performed by various plugins, or any thing you can think to store for future - all go inside the database.

Plugins: Your Best friends

If the graph protocol is the backbone of Pymetrix, then Plugins are the internal systems of Pymetrix. They are the ones that measure and provide you the metrics you need.

I’ve started Pymetrix with extensibility as the topmost priority - as with most Open Source Software. Inherit the plugins class, determine the parts you wanna track, and that’s all you need to do to set up Plugins. You can even write custom plugins.


comments powered by Disqus