Commit Graph

25 Commits

Author SHA1 Message Date
Juan Batiz-Benet
6bd4a6ddb2 epictest: fix mn.Peers() setup race
@maybebtc the error was not inside mocknet. the error is in
assuming the peers / nets returned follow the same order.
See:
- https://github.com/jbenet/go-ipfs/blob/master/epictest/addcat_test.go#L100
- https://gist.github.com/jbenet/a39bb9d2f16532a03bb8

if you want the results to be sorted by peer.ID before they
are returned, we can totally do that, but that's probably an
unsafe assumption to make in general-- if you do your
initialization async, the number of networks or peers may have
changed between the two calls. LMK what you prefer.

(thank you golang map chaosmonkey ;)
2014-12-27 22:59:35 -08:00
Juan Batiz-Benet
2877e2e986 epictest: add setup logging 2014-12-27 22:55:34 -08:00
Brian Tiger Chow
513c5687ed rename 2014-12-25 04:07:16 -05:00
Brian Tiger Chow
1891c8915d feat: test the three-legged cat 2014-12-25 04:07:16 -05:00
Brian Tiger Chow
abd971d393 extract initialization
refactor(epictest) Core

refactor: extract repo

fix

move core
2014-12-25 04:07:14 -05:00
Brian Tiger Chow
217611c237 use raw primitives 2014-12-25 01:18:01 -05:00
Brian Tiger Chow
589ed37bd7 rename variable 2014-12-25 01:17:52 -05:00
Brian Tiger Chow
237e594a8f don't link when creating network client. rely on caller 2014-12-24 09:31:19 -05:00
Brian Tiger Chow
075841c118 rm print 2014-12-24 09:31:19 -05:00
Brian Tiger Chow
d619e4ada9 cancel on exit 2014-12-24 09:31:19 -05:00
Brian Tiger Chow
35f6ddb8fa test(integration)
It's now possible to produce the DHT issues without process
orchestration.

Test1KBInstantaneous fails

@jbenet @whyrusleeping
2014-12-24 09:31:19 -05:00
Brian Tiger Chow
ad546f935a feat(integration_test) add make task to perform benchmarks in docker env
pprof cannot be used reliably on OS X. This provides two make tasks to
collect and analyze profiling data.

To run profiling in a dockerized linux environment...
```
make // or `make collect`
```

To analyze results on host machine...
```
make analyze
```

@jbenet @whyrusleeping
2014-12-24 09:31:19 -05:00
Brian Tiger Chow
ca32a83394 wip with DHT
@whyrusleeping @jbenet this is a WIP with the DHT.

wip

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Conflicts:
	epictest/addcat_test.go
	exchange/bitswap/testnet/peernet.go
	exchange/bitswap/testutils.go
	routing/mock/centralized_server.go
	routing/mock/centralized_test.go
	routing/mock/interface.go

fix(routing/mock) fill in function definition
2014-12-24 09:31:19 -05:00
Brian Tiger Chow
6da57c6764 feat(bitswap/testnet) impl a version of bitswap testnet that uses mockpeernet under the hood
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
27dc9594ba refactor(bitswap) bitswap.Network now abstracts ipfs.Network + ipfs.Routing
@jbenet @whyrusleeping

the next commit will change bitswap.Network.FindProviders to only deal
with IDs
2014-12-23 09:19:21 -08:00
Brian Tiger Chow
9fafec1256 do not run epic tests in parallel
@whyrusleeping

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:46 -08:00
Brian Tiger Chow
19e8eb5158 fix: formatting
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-15 22:01:17 -08:00
Brian Tiger Chow
c048b6b0ff add mixed benchmark
BenchmarkMixedAddCat1MBXX              2         517168259 ns/op 2.03 MB/s
BenchmarkMixedAddCat2MBXX              2         526999378 ns/op 3.98 MB/s
BenchmarkMixedAddCat4MBXX              2         543184846 ns/op 7.72 MB/s
BenchmarkMixedAddCat8MBXX              2         590800431 ns/op 14.20 MB/s
BenchmarkMixedAddCat16MBX              2         688463619 ns/op 24.37 MB/s
BenchmarkMixedAddCat32MBX              2         881731910 ns/op 38.06 MB/s
BenchmarkMixedAddCat64MBX              1        1254493054 ns/op 53.49 MB/s
BenchmarkMixedAddCat128MB              1        1941335608 ns/op 69.14 MB/s
BenchmarkMixedAddCat256MB              1        4748005512 ns/op 56.54 MB/s

@whyrusleeping

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-15 20:57:44 -08:00
Brian Tiger Chow
e30f497c74 add more routing benchmarks
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-15 20:52:52 -08:00
Brian Tiger Chow
34b11a3b07 fix: routing mock accuracy
routing interface doesn't wait for value to appear in network, but value
doesn't appear in network until time as passed

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-15 20:46:43 -08:00
Brian Tiger Chow
5b56a67dbb hotfix: copy paste error
@jbenet @whyrusleeping

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-15 20:46:20 -08:00
Brian Tiger Chow
e47eaed419 fix(epictest) generate data before starting benchmark
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-14 18:11:44 -08:00
Brian Tiger Chow
9a85f8fa72 style: Stop -> Close() error for Closer interface
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-14 16:35:09 -08:00
Brian Tiger Chow
71d6e5c1a8 fix(epic) use PRNG
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-13 07:39:50 -08:00
Brian Tiger Chow
be982269e5 feat(epictest) tests and benchmarks
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-13 05:43:27 -08:00