Skip to content

Commit

Permalink
add md file
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Nov 30, 2024
1 parent 93823ea commit 01a6689
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/local_testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# Local Testing

## From Neo4j Desktop
Start a Neo4j instance. Choose a password `<password>`.Allow it to create the default database namespace `neo4j`.

```
export LIBRA_GRAPH_DB_URI='neo4j://localhost'
export LIBRA_GRAPH_DB_USER='neo4j'
export LIBRA_GRAPH_DB_PASS=<password>
```

Import the sample exchange orders

```
cargo r enrich-exchange --exchange-json ./tests/fixtures/savedOlOrders2.json
```
Try to run analytics

```
# try without updating data
cargo r analytics exchange-rms
# save the analysis to db
cargo r analytics exchange-rms --persist
```

## View graph

Go to Neo4j Explorer and try:
```
MATCH ()-[r:Swap]->()
RETURN COUNT(DISTINCT(r))
```

Shoudl return `25450`

0 comments on commit 01a6689

Please sign in to comment.