Skip to content

Commit a2784ab

Browse files
authored
Merge pull request #95 from ipfs/release/v0.1.2
Release/v0.1.2
2 parents 29acd2c + f940d77 commit a2784ab

File tree

8 files changed

+37
-24
lines changed

8 files changed

+37
-24
lines changed

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,22 @@ Minor fix for alternate persistence stores and deduplication
147147
|-------------|---------|---------|---------------|
148148
| Hannah Howard | 1 | +316/-7 | 10 |
149149

150+
# go-graphsync 0.1.2
151+
152+
Minor release with initial benchmarks
153+
154+
### Changelog
155+
156+
- github.com/ipfs/go-graphsync:
157+
- Benchmark framework + First memory fixes (#89) ([ipfs/go-graphsync#89](https://github.com/ipfs/go-graphsync/pull/89))
158+
- docs(CHANGELOG): update for v0.1.1 ([ipfs/go-graphsync#85](https://github.com/ipfs/go-graphsync/pull/85))
159+
160+
### Contributors
161+
162+
| Contributor | Commits | Lines ± | Files Changed |
163+
|-------------|---------|---------|---------------|
164+
| Hannah Howard | 1 | +1055/-39 | 17 |
165+
150166
### 🙌🏽 Want to contribute?
151167

152168
Would you like to contribute to this repo and don’t know how? Here are a few places you can get started:

benchmarks/benchmark_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import (
1616

1717
"github.com/ipfs/go-blockservice"
1818
"github.com/ipfs/go-cid"
19-
"github.com/ipfs/go-graphsync/benchmarks/testinstance"
20-
tn "github.com/ipfs/go-graphsync/benchmarks/testnet"
2119
blockstore "github.com/ipfs/go-ipfs-blockstore"
2220
chunker "github.com/ipfs/go-ipfs-chunker"
2321
delay "github.com/ipfs/go-ipfs-delay"
@@ -33,6 +31,9 @@ import (
3331
"github.com/ipld/go-ipld-prime/traversal/selector/builder"
3432
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
3533
"github.com/stretchr/testify/require"
34+
35+
"github.com/ipfs/go-graphsync/benchmarks/testinstance"
36+
tn "github.com/ipfs/go-graphsync/benchmarks/testnet"
3637
)
3738

3839
const stdBlockSize = 8000

benchmarks/testinstance/testinstance.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ import (
88
ds "github.com/ipfs/go-datastore"
99
"github.com/ipfs/go-datastore/delayed"
1010
ds_sync "github.com/ipfs/go-datastore/sync"
11-
graphsync "github.com/ipfs/go-graphsync"
12-
tn "github.com/ipfs/go-graphsync/benchmarks/testnet"
13-
gsimpl "github.com/ipfs/go-graphsync/impl"
14-
gsnet "github.com/ipfs/go-graphsync/network"
15-
"github.com/ipfs/go-graphsync/storeutil"
1611
blockstore "github.com/ipfs/go-ipfs-blockstore"
1712
delay "github.com/ipfs/go-ipfs-delay"
1813
"github.com/ipld/go-ipld-prime"
1914
peer "github.com/libp2p/go-libp2p-core/peer"
2015
p2ptestutil "github.com/libp2p/go-libp2p-netutil"
2116
tnet "github.com/libp2p/go-libp2p-testing/net"
17+
18+
graphsync "github.com/ipfs/go-graphsync"
19+
tn "github.com/ipfs/go-graphsync/benchmarks/testnet"
20+
gsimpl "github.com/ipfs/go-graphsync/impl"
21+
gsnet "github.com/ipfs/go-graphsync/network"
22+
"github.com/ipfs/go-graphsync/storeutil"
2223
)
2324

2425
// TempDirGenerator is any interface that can generate temporary directories

benchmarks/testnet/interface.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package testnet
22

33
import (
4-
gsnet "github.com/ipfs/go-graphsync/network"
5-
64
"github.com/libp2p/go-libp2p-core/peer"
75
tnet "github.com/libp2p/go-libp2p-testing/net"
6+
7+
gsnet "github.com/ipfs/go-graphsync/network"
88
)
99

1010
// Network is an interface for generating graphsync network interfaces
@@ -13,4 +13,3 @@ type Network interface {
1313
Adapter(tnet.Identity) gsnet.GraphSyncNetwork
1414
HasPeer(peer.ID) bool
1515
}
16-

benchmarks/testnet/internet_latency_delay_generator_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import (
66
"testing"
77
"time"
88

9-
"github.com/ipfs/go-graphsync/benchmarks/testnet"
109
"github.com/stretchr/testify/require"
10+
11+
"github.com/ipfs/go-graphsync/benchmarks/testnet"
1112
)
1213

1314
const testSeed = 99

benchmarks/testnet/network_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import (
66
"testing"
77

88
blocks "github.com/ipfs/go-block-format"
9-
"github.com/ipfs/go-graphsync/benchmarks/testnet"
10-
gsmsg "github.com/ipfs/go-graphsync/message"
11-
gsnet "github.com/ipfs/go-graphsync/network"
129
delay "github.com/ipfs/go-ipfs-delay"
13-
1410
"github.com/libp2p/go-libp2p-core/peer"
1511
tnet "github.com/libp2p/go-libp2p-testing/net"
12+
13+
"github.com/ipfs/go-graphsync/benchmarks/testnet"
14+
gsmsg "github.com/ipfs/go-graphsync/message"
15+
gsnet "github.com/ipfs/go-graphsync/network"
1616
)
1717

1818
func TestSendMessageAsyncButWaitForResponse(t *testing.T) {

benchmarks/testnet/virtual.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ import (
77
"sync"
88
"time"
99

10-
gsmsg "github.com/ipfs/go-graphsync/message"
11-
gsnet "github.com/ipfs/go-graphsync/network"
12-
1310
delay "github.com/ipfs/go-ipfs-delay"
1411
mockrouting "github.com/ipfs/go-ipfs-routing/mock"
15-
1612
"github.com/libp2p/go-libp2p-core/peer"
1713
tnet "github.com/libp2p/go-libp2p-testing/net"
1814
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
15+
16+
gsmsg "github.com/ipfs/go-graphsync/message"
17+
gsnet "github.com/ipfs/go-graphsync/network"
1918
)
2019

2120
// VirtualNetwork generates a new testnet instance - a fake network that

requestmanager/asyncloader/asyncloader.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ func (al *AsyncLoader) AsyncLoad(requestID graphsync.RequestID, link ipld.Link)
117117
resultChan := make(chan types.AsyncLoadResult, 1)
118118
response := make(chan error, 1)
119119
lr := loadattemptqueue.NewLoadRequest(requestID, link, resultChan)
120-
err := al.sendSyncMessage(&loadRequestMessage{response, requestID, lr}, response)
121-
if err != nil {
122-
resultChan <- types.AsyncLoadResult{Data: nil, Err: err}
123-
close(resultChan)
124-
}
120+
_ = al.sendSyncMessage(&loadRequestMessage{response, requestID, lr}, response)
125121
return resultChan
126122
}
127123

0 commit comments

Comments
 (0)