mirror of
https://github.com/logos-storage/logos-storage-network-crawler.git
synced 2026-01-02 21:43:11 +00:00
Sets up empty project
This commit is contained in:
commit
765bc66162
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
*
|
||||
!*.*
|
||||
!*/
|
||||
coverage
|
||||
nimcache
|
||||
tests/testAll
|
||||
nimble.develop
|
||||
nimble.paths
|
||||
nim.cfg
|
||||
nimbus-build-system.paths
|
||||
vendor/*
|
||||
NimBinaries
|
||||
.update.timestamp
|
||||
*.dSYM
|
||||
.vscode/*
|
||||
*.exe
|
||||
24
README.md
Normal file
24
README.md
Normal file
@ -0,0 +1,24 @@
|
||||
# Codex Network Crawler
|
||||
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](#stability)
|
||||
[](https://github.com/codex-storage/nim-codex-dht/actions/workflows/ci.yml?query=workflow%3ACI+branch%3Amaster)
|
||||
[](https://codecov.io/gh/codex-storage/nim-codex-dht)
|
||||
|
||||
# !! Work in Progress !!
|
||||
|
||||
This project uses nim-codex-dht, nim-libp2p, nim-ethers, and nim-metrics to create a metrics service. The crawler will traverse the Codex network and produce metrics such as:
|
||||
- Number of DHT nodes (alive vs total)
|
||||
- P2P connectivity (percentage)
|
||||
- Storage contract statistics (created, total size, average size, average duration, pricing information??)
|
||||
|
||||
Metrics are published from a scrape target.
|
||||
|
||||
# Usage
|
||||
|
||||
```sh
|
||||
nimble build
|
||||
nimble test
|
||||
nimble run
|
||||
```
|
||||
5
codexcrawler.nim
Normal file
5
codexcrawler.nim
Normal file
@ -0,0 +1,5 @@
|
||||
import
|
||||
./codexcrawler/todo
|
||||
|
||||
when isMainModule:
|
||||
run()
|
||||
27
codexcrawler.nimble
Normal file
27
codexcrawler.nimble
Normal file
@ -0,0 +1,27 @@
|
||||
# Package
|
||||
|
||||
version = "0.0.1"
|
||||
author = "Codex core contributors"
|
||||
description = "Crawler for Codex networks"
|
||||
license = "MIT"
|
||||
skipDirs = @["tests"]
|
||||
bin = @["codexcrawler"]
|
||||
|
||||
# Dependencies
|
||||
# requires "secp256k1#2acbbdcc0e63002a013fff49f015708522875832" # >= 0.5.2 & < 0.6.0
|
||||
# requires "protobuf_serialization" # >= 0.2.0 & < 0.3.0
|
||||
# requires "nimcrypto >= 0.5.4"
|
||||
# requires "bearssl == 0.2.5"
|
||||
# requires "chronicles >= 0.10.2 & < 0.11.0"
|
||||
# requires "chronos >= 4.0.3 & < 5.0.0"
|
||||
# requires "libp2p == 1.5.0"
|
||||
# requires "metrics"
|
||||
# requires "stew#head"
|
||||
# requires "stint"
|
||||
# requires "https://github.com/codex-storage/nim-datastore >= 0.1.0 & < 0.2.0"
|
||||
# requires "questionable"
|
||||
|
||||
task test, "Run tests":
|
||||
exec "nimble install -d -y"
|
||||
withDir "tests":
|
||||
exec "nimble test"
|
||||
2
codexcrawler/todo.nim
Normal file
2
codexcrawler/todo.nim
Normal file
@ -0,0 +1,2 @@
|
||||
proc run*() =
|
||||
echo "Run!"
|
||||
7
tests/codexcrawler/exampletest.nim
Normal file
7
tests/codexcrawler/exampletest.nim
Normal file
@ -0,0 +1,7 @@
|
||||
import pkg/asynctest/chronos/unittest
|
||||
|
||||
suite "Example tests":
|
||||
test "Example":
|
||||
echo "Woo!"
|
||||
check:
|
||||
1 == 1
|
||||
3
tests/test.nim
Normal file
3
tests/test.nim
Normal file
@ -0,0 +1,3 @@
|
||||
import ./codexcrawler/exampletest
|
||||
|
||||
{.warning[UnusedImport]: off.}
|
||||
14
tests/test.nimble
Normal file
14
tests/test.nimble
Normal file
@ -0,0 +1,14 @@
|
||||
# Package
|
||||
|
||||
version = "0.0.1"
|
||||
author = "Codex core contributors"
|
||||
description = "Tests for crawler for Codex networks"
|
||||
license = "MIT"
|
||||
installFiles = @["build.nims"]
|
||||
|
||||
# Dependencies
|
||||
requires "asynctest >= 0.5.2 & < 0.6.0"
|
||||
requires "unittest2 <= 0.0.9"
|
||||
|
||||
task test, "Run tests":
|
||||
exec "nim c -r test.nim"
|
||||
Loading…
x
Reference in New Issue
Block a user