mirror of
https://github.com/grassrootseconomics/cic-chain-events.git
synced 2024-11-05 17:36:45 +01:00
Mohamed Sohail
20fc30c34a
* feat: init base logic for rpc fetcher * feat: rpc block fetcher, move filters to internal * move filters to internal folder * rpc block fetcher * add benchmarks: goos: linux goarch: amd64 pkg: github.com/grassrootseconomics/cic-chain-events/pkg/fetch cpu: AMD EPYC Processor Benchmark_RPC Benchmark_RPC/RPC_Block_Fetcher_Benchmark Benchmark_RPC/RPC_Block_Fetcher_Benchmark-4 25 46000646 ns/op 221697 B/op 844 allocs/op Benchmark_GraphQL Benchmark_GraphQL/GraphQL_Block_Fetcher_Benchmark Benchmark_GraphQL/GraphQL_Block_Fetcher_Benchmark-4 56 21219962 ns/op 56686 B/op 94 allocs/op PASS ok github.com/grassrootseconomics/cic-chain-events/pkg/fetch 2.920s * inline-docs: Describe RPC fetcher
28 lines
721 B
Makefile
28 lines
721 B
Makefile
SHELL := /bin/bash
|
|
BIN := cic-chain-events
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
CGO_ENABLED=1 go build -v -ldflags="-s -w" -o ${BIN} cmd/*.go
|
|
|
|
run:
|
|
CGO_ENABLED=1 go run -ldflags="-s -w" cmd/*.go
|
|
|
|
mod:
|
|
go mod tidy
|
|
go mod verify
|
|
|
|
test-pkg:
|
|
TEST_GRAPHQL_ENDPOINT=https://rpc.alfajores.celo.grassecon.net/graphql go test -v -covermode atomic -coverprofile=covprofile ./pkg/...
|
|
|
|
bench-pkg:
|
|
TEST_RPC_ENDPOINT=https://rpc.alfajores.celo.grassecon.net TEST_GRAPHQL_ENDPOINT=https://rpc.alfajores.celo.grassecon.net/graphql go test -v -bench=. -run=^Benchmark ./pkg/...
|
|
|
|
migrate:
|
|
tern migrate -c migrations/tern.conf
|
|
|
|
docker-clean:
|
|
docker-compose down
|
|
docker volume rm cic-chain-events_cic-indexer-pg cic-chain-events_cic-indexer-nats
|