Raúl Kripalani
9194e8fbdf
Merge pull request #33 from raulk/txndatastore
...
Migrate to ds.TxnDatastore, optimisations++, cache changes, benchmarks
2018-09-14 10:34:16 +01:00
Raúl Kripalani
b75ed37f2b
reintroduce import prefixes.
2018-09-13 16:10:14 +01:00
Raúl Kripalani
7c5cf50d9b
adjust ttl tests as badger doesn't support sub-second ttl.
2018-09-13 16:09:32 +01:00
Raúl Kripalani
23be462e82
Merge branch 'txndatastore' into ttldatastore
2018-09-13 16:02:09 +01:00
Raúl Kripalani
7e645fa115
do not prettify cache keys (peer ids).
2018-09-13 15:33:30 +01:00
Raúl Kripalani
afc9ee92b0
performance optimisation round.
2018-09-13 15:33:30 +01:00
Raúl Kripalani
9277207b35
remove deprecated ttlManager.
2018-09-13 12:49:03 +01:00
Raúl Kripalani
80fc9f03ca
migrate from bespoke TTL manager to db-managed TTLs.
2018-09-13 12:21:30 +01:00
Raúl Kripalani
622589ab31
attempt to fix time-dependent tests in CI.
2018-09-13 10:35:03 +01:00
Raúl Kripalani
95cce50f15
hopefully fix intermittent time-dependent test failure.
2018-09-12 13:53:10 +01:00
Raúl Kripalani
c7d99489fd
address review comments.
2018-09-12 13:53:10 +01:00
Raúl Kripalani
4e0c2169c7
Resolve TODO.
2018-09-12 13:42:26 +01:00
Raúl Kripalani
4037390c42
increase test coverage.
2018-09-11 18:17:27 +01:00
Raúl Kripalani
7ae2621803
small fixes.
2018-09-11 14:42:19 +01:00
Raúl Kripalani
eb2575505d
fix bug in PeersWithAddrs().
2018-09-11 14:14:56 +01:00
Raúl Kripalani
1b410c7294
Merge branch 'master' into txndatastore
2018-09-11 14:13:14 +01:00
Raúl Kripalani
903aa12603
check cache in ClearAddrs and perform targeted delete.
2018-09-11 12:43:36 +01:00
Raúl Kripalani
03ee26fd4f
change cache layout, now peer.ID => []ma.Multiaddr.
2018-09-11 11:48:23 +01:00
Raúl Kripalani
ca6f050174
add baseline benchmarks.
2018-09-10 19:59:27 +01:00
Steven Allen
dcb3a93288
gx: remove temporary files from published version
2018-09-07 22:00:47 -07:00
Raúl Kripalani
ee1756a6b3
Merge pull request #32 from raulk/keybook-tests
...
* Introduce tests for KeyBook to increase coverage.
* Change usages of []peer.ID to IDSlice, which supports sorting.
* Restructure AddrBook tests into subtests.
* Import aliases.
2018-09-07 19:01:48 +01:00
Raúl Kripalani
1924b49047
gx publish 2.0.0
2018-09-07 18:47:01 +01:00
Raúl Kripalani
1c25f160a1
normalise import aliases.
2018-09-07 18:46:23 +01:00
Raúl Kripalani
08de02b668
regroup test utils; remove unused function.
2018-09-07 18:45:58 +01:00
Raúl Kripalani
2901497643
migrate Addrs() and PeersWithAddrs() to use txns, improve perf, benchmarks.
2018-09-07 18:37:01 +01:00
Raúl Kripalani
027d289a66
nested test cases in addr_book suite.
2018-09-07 16:54:00 +01:00
Raúl Kripalani
9be48ff689
optimise benchmark code.
2018-09-07 13:04:14 +01:00
Raúl Kripalani
171f051aa1
add tests for keybook; []peer.ID => peer.IDSlice.
2018-09-07 13:04:14 +01:00
Raúl Kripalani
95b7f1677e
Merge pull request #30 from raulk/refactor
...
* Refactor the peerstore into interface, in-memory implementation, datastore implementation.
* Create common test suites to test all implementations against.
* Normalise naming: rename AddrMgr => AddrBook everywhere.
* Create interface PeerMetadata, with in-memory implementation.
* Adjust wait times in time-dependent tests.
2018-09-07 12:49:26 +01:00
Raúl Kripalani
63dd530f1f
add mafmt import alias.
2018-09-07 12:43:27 +01:00
Raúl Kripalani
a3c72582f5
increase wait times in tests.
2018-09-06 20:18:25 +01:00
Raúl Kripalani
d79386365e
rename NewPeerstoreWith(...) => NewPeerstore(...); adjust godoc.
2018-09-05 15:14:57 +01:00
Raúl Kripalani
bc77b649dc
rename AddrMgr => AddrBook elsewhere.
2018-09-05 15:10:18 +01:00
Raúl Kripalani
7f4288fab1
rename package mem => pstoremem.
2018-09-04 18:07:44 +01:00
Raúl Kripalani
fe732515cd
add benchmark for ClearAddrs.
2018-09-04 18:02:00 +01:00
Raúl Kripalani
9b5c1de960
move benchmarks test cases to benchmarks_suite.go.
2018-09-04 16:21:02 +01:00
Raúl Kripalani
7d8b6c9843
ttl manager: create transaction only when needed.
...
Also adjust test logic. Last changes were ticking the ttl manager
too often unnecessarily. This was skewing benchmarks.
2018-09-04 14:52:26 +01:00
Raúl Kripalani
de573ac1ff
migrate TTL manager to ds.TxnDatastore.
2018-09-07 17:45:29 +01:00
Raúl Kripalani
1b57c62e3d
increase benchmark coverage; introduce config struct.
...
* benchmark caching and cacheless variants of DS addrbook.
* benchmark peers with 1, 10, 100 addrs.
2018-09-07 17:45:29 +01:00
Raúl Kripalani
ad75ca465e
regroup test and benchmark utils.
2018-09-07 17:45:29 +01:00
Raúl Kripalani
f8aeb5476e
another perf improvement iteration.
2018-09-07 17:45:25 +01:00
Raúl Kripalani
8b700dd78c
readd import alias for manet.
2018-09-04 11:42:42 +01:00
Raúl Kripalani
2f98672d1d
rename *Peers() to PeersWith*().
2018-09-02 12:18:00 +01:00
Raúl Kripalani
e200f3a5c1
gx-go unrewrite.
2018-09-02 12:10:55 +01:00
Raúl Kripalani
d0c3d2b341
rename ds package to pstoreds.
2018-09-02 12:03:02 +01:00
Raúl Kripalani
580527bc73
fix nil dereference in benchmarks.
2018-08-31 13:30:13 +01:00
Raúl Kripalani
039ee3a7b1
go fmt.
2018-08-31 13:23:02 +01:00
Raúl Kripalani
81615c1df7
go fmt.
2018-08-30 18:05:22 +01:00
Raúl Kripalani
06d419242c
normalize naming: AddrManager => AddrBook; ctor for memory-backed AddrBook.
2018-08-30 16:43:40 +01:00
Raúl Kripalani
5865418f5c
organise imports.
2018-08-30 16:24:09 +01:00