Raúl Kripalani
ca6f050174
add baseline benchmarks.
2018-09-10 19:59:27 +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
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
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
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
Raúl Kripalani
b9ac6b77b1
gx-go rw.
2018-08-30 15:26:03 +01:00
Raúl Kripalani
5d7633f0c9
move in-memory peerstore into mem package.
2018-08-30 15:26:03 +01:00
Raúl Kripalani
eaa2ccbf1e
refactor tests into suites.
...
This enables each implementation to subject itself to a common test
suite.
2018-08-30 13:44:50 +01:00
Raúl Kripalani
aeae977598
refactor peerstore (+)
...
1. Create interface.go with abstract interfaces.
2. Extract memory-based keybook into file.
3. Spin off PeerMetadata interface.
2018-08-29 16:23:04 +01:00
Cole Brown
b1e626f38d
gx publish 1.5.0
2018-08-27 19:06:57 -04:00
bigs
bb3d4c617a
Merge pull request #29 from libp2p/feat/persist_peerstore
...
Persist peerstore via Datastore
2018-08-27 18:41:54 -04:00
Cole Brown
f758b41fc4
Add lru cache dependency
2018-08-27 18:30:20 -04:00
Cole Brown
c2e901d580
Add datastore dependencies
2018-08-27 18:25:52 -04:00
Cole Brown
34b7dc806d
Implement proper benchmark with b.N
2018-08-27 18:20:29 -04:00
Cole Brown
f3e62000ee
Use b.N in benchmarks
2018-08-27 18:20:29 -04:00
Cole Brown
996387510d
Run benchmarks 10s, report rates
2018-08-27 18:20:29 -04:00
Cole Brown
1d5ab0b868
Update benchmark timings to stress peerstores more
2018-08-27 18:20:29 -04:00
Cole Brown
6a9cba0e1b
Update benchmarks to run against both peerstores
2018-08-27 18:20:29 -04:00
Cole Brown
4972b40efd
Add ARCCache to DatastoreAddrManager
2018-08-27 18:20:29 -04:00
Cole Brown
c0ff7b9b66
Acquire full lock when ticking ttlmanager
2018-08-27 18:20:29 -04:00
Cole Brown
f367209272
Handle batch Delete error
2018-08-27 18:20:29 -04:00
Cole Brown
f31d7e51ff
Use nil instead of empty Multiaddr
2018-08-27 18:20:29 -04:00
Cole Brown
e7dca4205e
Fix logic for AddAddrs
2018-08-27 18:20:29 -04:00
Cole Brown
9eeea343d5
Update ttlmanager to use ds.Batching
2018-08-27 18:20:29 -04:00
Cole Brown
78cd2c5abd
Implement error retry logic for transactions
2018-08-27 18:20:29 -04:00
Cole Brown
b550e5b2c6
Mutex hat pattern
2018-08-27 18:20:29 -04:00
Cole Brown
7e3363eeb4
Remove redundant channel from ttlmanager
2018-08-27 18:20:29 -04:00
Cole Brown
785b890ecb
Only lock critical section
2018-08-27 18:20:29 -04:00