@@ -5,12 +5,10 @@ import (
55	"crypto/rand" 
66	"fmt" 
77	"github.com/ipld/go-car/v2/blockstore" 
8- 	"net/http" 
98	_ "net/http/pprof" 
109	"sync/atomic" 
1110	"time" 
1211
13- 	"github.com/filecoin-project/boost/tracing" 
1412	lcli "github.com/filecoin-project/lotus/cli" 
1513	"github.com/ipfs/go-bitswap/client" 
1614	bsnetwork "github.com/ipfs/go-bitswap/network" 
@@ -25,7 +23,6 @@ import (
2523	"github.com/libp2p/go-libp2p/p2p/muxer/yamux" 
2624	quic "github.com/libp2p/go-libp2p/p2p/transport/quic" 
2725	"github.com/libp2p/go-libp2p/p2p/transport/tcp" 
28- 	"github.com/pkg/profile" 
2926	"github.com/urfave/cli/v2" 
3027	"golang.org/x/sync/errgroup" 
3128)
@@ -45,16 +42,6 @@ var fetchCmd = &cli.Command{
4542			Usage : "concurrent request limit - 0 means unlimited" ,
4643			Value : 10 ,
4744		},
48- 		& cli.BoolFlag {
49- 			Name :  "tracing" ,
50- 			Usage : "enables tracing of booster-bitswap calls" ,
51- 			Value : false ,
52- 		},
53- 		& cli.StringFlag {
54- 			Name :  "tracing-endpoint" ,
55- 			Usage : "the endpoint for the tracing exporter" ,
56- 			Value : "http://tempo:14268/api/traces" ,
57- 		},
5845	},
5946	Action : func (cctx  * cli.Context ) error  {
6047		if  cctx .Args ().Len () !=  3  {
@@ -75,32 +62,8 @@ var fetchCmd = &cli.Command{
7562
7663		outputCarPath  :=  cctx .Args ().Get (2 )
7764
78- 		defer  profile .Start (profile .TraceProfile , profile .ProfilePath ("." )).Stop ()
79- 
80- 		if  cctx .Bool ("pprof" ) {
81- 			go  func () {
82- 				err  :=  http .ListenAndServe ("localhost:6065" , nil )
83- 				if  err  !=  nil  {
84- 					log .Error (err )
85- 				}
86- 			}()
87- 		}
88- 
8965		ctx  :=  lcli .ReqContext (cctx )
9066
91- 		// Instantiate the tracer and exporter 
92- 		if  cctx .Bool ("tracing" ) {
93- 			tracingStopper , err  :=  tracing .New ("booster-bsclient" , cctx .String ("tracing-endpoint" ))
94- 			if  err  !=  nil  {
95- 				return  fmt .Errorf ("failed to instantiate tracer: %w" , err )
96- 			}
97- 			log .Info ("Tracing exporter enabled" )
98- 
99- 			defer  func () {
100- 				_  =  tracingStopper (ctx )
101- 			}()
102- 		}
103- 
10467		// setup libp2p host 
10568		log .Infow ("generating libp2p key" )
10669		privKey , _ , err  :=  crypto .GenerateECDSAKeyPair (rand .Reader )
0 commit comments