Commit Graph

42 Commits

Author SHA1 Message Date
Juan Batiz-Benet
1d5b903611 added cancel func calls previously ignored 2015-03-07 09:31:46 -08:00
Henry
92d08db7a5 rewrote import paths of go.net/context to use golang.org/x/context
- updated go-ctxgroup and goprocess
ctxgroup: AddChildGroup was changed to AddChild. Used in two files:
- p2p/net/mock/mock_net.go
- routing/dht/dht.go

- updated context from hg repo to git
prev. commit in hg was ad01a6fcc8a19d3a4478c836895ffe883bd2ceab. (context: make parentCancelCtx iterative)
represents commit 84f8955a887232b6308d79c68b8db44f64df455c in git repo

- updated context to master (b6fdb7d8a4ccefede406f8fe0f017fb58265054c)

Aaron Jacobs (2):
net/context: Don't accept a context in the DoSomethingSlow example.
context: Be clear that users must cancel the result of WithCancel.

Andrew Gerrand (1):
go.net: use golang.org/x/... import paths

Bryan C. Mills (1):
net/context: Don't leak goroutines in Done example.

Damien Neil (1):
context: fix removal of cancelled timer contexts from parent

David Symonds (2):
context: Fix WithValue example code.
net: add import comments.

Sameer Ajmani (1):
context: fix TestAllocs to account for ints in interfaces
2015-02-25 11:58:19 +01:00
Juan Batiz-Benet
58f39687cf logs: removed all log.Errors unhelpful to users
Let's save log.Error for things the user can take action on.
Moved all our diagnostics to log.Debug. We can ideally reduce them
even further.
2015-02-03 01:06:07 -08:00
Jeromy
65b657e0ea stream back diagnostic responses as they are received 2015-01-23 02:08:28 -08:00
Juan Batiz-Benet
f6278735ef net/diag: recursively decrement timeouts.
Not sure this works. we dont have tests for net diag.
We should make some.
cc @whyrusleeping.
2015-01-23 02:08:28 -08:00
Juan Batiz-Benet
c64338a816 diag/net: io must respect timeout ctx
See the discussion below. A future commit will implement the closer
change below, and rebase this one on top.

<•jbenet> `n.Diagnostics.GetDiagnostic(time.Second * 20)` is not being respected. should it use a context instead? or is it a timeout because the timeout is sent to other nodes?
<•jbenet> oh it's that the io doesnt respect the context so we're stuck waiting for responses.
<•jbenet> this is that complex interface point between the world of contexts, and the world of io. ctxutil.Reader/Writer is made for this, but you have to make sure to defer close the stream. (see how dht_net uses it). i'd love to find a safer interface. not sure what it is, but we have to a) respect contexts, and b) allow using standard io.Reader/Writers. Maybe TRTTD
<•jbenet> is have ctxutil.Reader/Writer take ReadCloser and WriteClosers and always close them. the user _must_ pass an ioutil. NopCloser to avoid ctxutil closing on you when you dont want it to.
<•jbenet> this seems safer to me in the general case.
2015-01-23 02:08:28 -08:00
Juan Batiz-Benet
b896eef3bb Moved out d3view
d3view is now in its own repo:
https://github.com/jbenet/ipfs-diag-net-d3-vis

This is so we can iterate on it quickly without having to
needlessly waste CI resources.

The repo also installs it for you:

```sh
git clone github.com/jbenet/ipfs-diag-net-d3-vis d3view
cd d3view
sudo make install
```
2015-01-16 11:30:10 -08:00
Juan Batiz-Benet
cff596d42a diag/net: more powerfil d3 vis 2015-01-16 02:12:24 -08:00
Matt Bell
01cca5bfe2 diagnostics/d3: Added link highlighting 2015-01-14 16:48:50 -08:00
Juan Batiz-Benet
a14d77e368 diagnostics/d3: node sizes 2015-01-14 16:16:26 -08:00
Juan Batiz-Benet
a2cee3f165 diagnostics/d3: added # of conns 2015-01-14 10:29:55 -08:00
Juan Batiz-Benet
dd409fb151 diagnostics/d3/view: added chord viewer hash 2015-01-14 09:23:48 -08:00
Juan Batiz-Benet
b9f828e1e3 diagnostics: added chord viewer 2015-01-14 09:18:21 -08:00
Juan Batiz-Benet
2669479056 diagnostics/d3 viewer.html -> force.html 2015-01-14 09:17:48 -08:00
Juan Batiz-Benet
b8757d18ef diag/net: visualizing in d3 and dot
Try it out:

```
ipfs net diag --vis=d3 | diagnostics/d3/d3view
```

Notes: this is not the best way to do it, because it
breaks `--encoding=json`. Not sure what the best way is, and
right now this provides more utility than the other.
2015-01-13 23:49:35 -08:00
Jeromy
6cb46a706c keep track of number of same connections 2015-01-12 02:55:15 -08:00
Jeromy
5d86ce1f71 adjust naming 2015-01-12 02:55:15 -08:00
Jeromy
98f9ee916e a better fix for duplicate peers in getPeers() 2015-01-12 02:55:15 -08:00
Jeromy
a2ec7f28dc use conns to enumerate peers for network diagnostic 2015-01-12 02:55:14 -08:00
Juan Batiz-Benet
8fb5cf9578 swap net2 -> net 2015-01-02 08:46:46 -08:00
Juan Batiz-Benet
e2698a8733 net -> p2p/net
The net package is the next to move. It will be massaged
a bit still to fix the Network / "NetworkBackend" conflict.
2015-01-02 08:46:45 -08:00
Juan Batiz-Benet
89f5cd4c94 introducing p2p pkg
I think it's time to move a lot of the peer-to-peer networking
but-not-ipfs-specific things into its own package: p2p.
This could in the future be split off into its own library.
The first thing to go is the peer.
2015-01-02 08:46:45 -08:00
Jeromy
37f79bc552 fix panic in net diag 2014-12-30 22:06:32 +00:00
Juan Batiz-Benet
c84a714b16 peer change: peer.Peer -> peer.ID
this is a major refactor of the entire codebase
it changes the monolithic peer.Peer into using
a peer.ID and a peer.Peerstore.

Other changes:
- removed handshake3.
-	testutil vastly simplified peer
-	secio bugfix + debugging logs
-	testutil: RandKeyPair
-	backpressure bugfix: w.o.w.
-	peer: added hex enc/dec
-	peer: added a PeerInfo struct
  PeerInfo is a small struct used to pass around a peer with
 	a set of addresses and keys. This is not meant to be a
 	complete view of the system, but rather to model updates to
 	the peerstore. It is used by things like the routing system.
-	updated peer/queue + peerset
-	latency metrics
-	testutil: use crand for PeerID gen
 	RandPeerID generates random "valid" peer IDs. it does not
 	NEED to generate keys because it is as if we lost the key
 	right away. fine to read some randomness and hash it. to
 	generate proper keys and an ID, use:
 	  sk, pk, _ := testutil.RandKeyPair()
 	  id, _ := peer.IDFromPublicKey(pk)
 	Also added RandPeerIDFatal helper
- removed old spipe
- updated seccat
- core: cleanup initIdentity
- removed old getFromPeerList
2014-12-23 08:33:32 -08:00
Juan Batiz-Benet
ba323c3e48 make vendor 2014-12-17 23:25:38 -08:00
Juan Batiz-Benet
41751b4938 Integrated new network into ipfs 2014-12-16 14:47:29 -08:00
Brian Tiger Chow
9eccce1f93 fix(2/diag) match ipfs output
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-14 03:20:02 -08:00
Jeromy
4f083d54d6 write a few package doc strings to improve look of godoc 2014-11-08 21:42:36 -08:00
Jeromy
88bf39118c comment comment comment comment 2014-11-03 03:02:56 +00:00
Juan Batiz-Benet
184c25430b go-vet friendly codebase
- distinguish log.Error and log.Errorf functions
- Initialize structs with field names
- A bit of unreachable code (defers)
2014-10-25 03:46:39 -07:00
Brian Tiger Chow
30faf11bfa fix(diag) rename proto package -> diagnostics_pb 2014-10-22 15:54:18 -07:00
Brian Tiger Chow
528a7cbd51 refactor(diagnostics) move proto to internal pb package
https://docs.google.com/document/d/1e8kOo3r51b2BWtTs_1uADIA5djfXhPT36s6eHVRIvaU/edit
2014-10-22 15:54:17 -07:00
Juan Batiz-Benet
9ca87fbb93 peer.Peer is now an interface
![](http://m.memegen.com/77n7dk.jpg)
2014-10-20 03:26:46 -07:00
Juan Batiz-Benet
3a284661fc make vendor
@whyrusleeping `make vendor` or travis fails
2014-10-18 04:28:26 -07:00
Jeromy
779af0e731 add file i had forgotten to 2014-10-18 04:28:25 -07:00
Jeromy
b2bd6848a8 fix core NewNode not setting network field, and added new json serializer for diagnostics 2014-10-18 04:28:25 -07:00
Jeromy
be5f9769b2 put bandwidth totals into the diagnostic messages 2014-10-18 04:28:25 -07:00
Jeromy
4189d50d77 fix bug in diagnostics, and add more peers to closer peer responses 2014-10-18 04:28:25 -07:00
Jeromy
226e7f430e add diagnostic logging 2014-10-10 13:18:20 -07:00
Jeromy
a7b69500b1 address concerns in PR and make log stuff more fun 2014-10-10 13:18:20 -07:00
Jeromy
d5f0476c1c implement diagnostics command 2014-10-10 13:18:19 -07:00
Jeromy
280c7e7e06 implement diagnostics service 2014-10-10 13:18:19 -07:00