MCPcopy Index your code
hub / github.com/InMobi/level-tsd

github.com/InMobi/level-tsd @0.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.0.1 ↗ · + Follow
84 symbols 246 edges 13 files 1 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

level-tsd

leveldb based backend for graphite.

Installion instructions

Assumption

You are familiar on how to install and operate graphite in general. If not, have a look at these instructions. The install from source instructions (this one) is what the rest of the document specifically based on.

Getting leveldb

There is a nice script that provides leveldb extensions for python. It can be installed by using this package

Plugin

Install the plugin using pip

pip install -git+https://github.com/InMobi/level-tsd.git#egg=pyleveltsd

Carbon

We require the megacarbon branch of carbon daemon. This is becase no other version permits storage plugins. There is still a small level of change that needs to be done as the plugin autodiscovery mechanism is broken. Hence, you need to use this fork:

pip install -git+https://github.com/InMobi/carbon.git@leveltsd#egg=carbon

Set the storage engine as follows by editing your db.conf

DATABASE = level-tsd

Graphite-web

Assumption : The graphite version is 0.10.0 or above. Specifically, it needs to support the STORAGE_FINDERS directive

Add the following to your local_settings.py

STORAGE_FINDERS = ( 
    'pyleveltsd.gateway.LevelRpcFinder',
)

LEVEL_RPC_PATH="http://localhost:2005"

Note that you may need to modify the STORAGE_FINDERS section if you have other storage mechanisms that need to be used. Most users would be interested in also adding graphite.finders.standard.StandardFinder to the list.

TODO

(All of these should be turned into issues)

  1. Make the json RPC port configurable
  2. Make the binding network interface of the json RPC configurable
  3. Leveldb tunables (block size, buffer size, cache size, etc. etc.) as configurations
  4. Flush the batched metrics after a fixed time interval
  5. Configurable size for write batch

Core symbols most depended-on inside this repo

write
called by 11
pyleveltsd/writer.py
upsert
called by 8
pyleveltsd/base.py
_get_effective_key
called by 3
pyleveltsd/base.py
get_metric_shortcut
called by 3
pyleveltsd/base.py
get_children
called by 3
pyleveltsd/base.py
_rounder
called by 3
pyleveltsd/gateway.py
_scrub_metric
called by 3
pyleveltsd/cstore.py
get_range_data
called by 2
pyleveltsd/reader.py

Shape

Method 63
Class 17
Function 4

Languages

Python100%

Modules by API surface

pyleveltsd/base.py34 symbols
pyleveltsd/gateway.py17 symbols
pyleveltsd/cstore.py12 symbols
pyleveltsd/reader.py5 symbols
pyleveltsd/writer.py4 symbols
tests/test_writer.py2 symbols
tests/test_serde.py2 symbols
tests/test_reader.py2 symbols
tests/test_dir.py2 symbols
tests/carbon_path.py2 symbols
setup.py2 symbols

For agents

$ claude mcp add level-tsd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page