Skip to content

Commit

Permalink
Merge branch 'main' into fix/first-order-dangling-affirmation-delete
Browse files Browse the repository at this point in the history
  • Loading branch information
originalsouth authored Oct 16, 2024
2 parents ca01648 + 3ab9a41 commit 00a0c99
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/source/developer_documentation/octopoes.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,38 @@ $ ./xtdb-cli.py -n MyOrganisationName attribute-stats |jq .
 }
```

### XTDB analyze bits tool

This guide assumes the following:

- A virtual environment for the octopoes folder is created and the development requirements are installed.

This tooling can be used when you are developing bits (business rules). It outputs the transaction times in the database, the source and bit information, including parameters and how long the running time was.

Enable the `GATHER_BIT_METRICS` setting in the following file. The flag is at the bottom of the file. Change `GATHER_BIT_METRICS=False` to `GATHER_BIT_METRICS=True`.

```
octopoes/octopoes/config/settings.py
```

Run a `make reset` in your KAT instance to enable the setting:

```
make reset
```

Create some data by adding a hostname, enable some boefjes, etc. This will allow the bit metrics to be gathered. You can query the bit metrics using the following commands. The `node` is the name of your organisation. In this example the organisation name is 'aa'.

```
python3 octopoes/tools/analyze-bit-metric.py --node "aa" raw |jq
```

```
python3 octopoes/tools/xtdb-cli.py -n "aa" history --with-docs "BIT_METRIC" |jq
```

If you want to query the XTDB database directly, you can use the XTDB-tool. This is explained on the following page: https://docs.openkat.nl/developer_documentation/octopoes.html#xtdb-cli-tool.

## OOI

OOI objects are instances of relatively simple classes, which inherit from `OOI`.
Expand Down

0 comments on commit 00a0c99

Please sign in to comment.