mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-24 23:34:45 +00:00
Update main.go
This commit is contained in:
parent
dc62195a8f
commit
eb02ecda20
@ -10,6 +10,7 @@ import (
|
|||||||
"github.com/romana/rlog"
|
"github.com/romana/rlog"
|
||||||
"github.com/up9inc/mizu/shared"
|
"github.com/up9inc/mizu/shared"
|
||||||
"github.com/up9inc/mizu/tap"
|
"github.com/up9inc/mizu/tap"
|
||||||
|
"log"
|
||||||
"mizuserver/pkg/api"
|
"mizuserver/pkg/api"
|
||||||
"mizuserver/pkg/middleware"
|
"mizuserver/pkg/middleware"
|
||||||
"mizuserver/pkg/models"
|
"mizuserver/pkg/models"
|
||||||
@ -18,6 +19,7 @@ import (
|
|||||||
"mizuserver/pkg/utils"
|
"mizuserver/pkg/utils"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"runtime/pprof"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -65,6 +67,12 @@ func main() {
|
|||||||
go pipeChannelToSocket(socketConnection, harOutputChannel)
|
go pipeChannelToSocket(socketConnection, harOutputChannel)
|
||||||
go api.StartReadingOutbound(outboundLinkOutputChannel)
|
go api.StartReadingOutbound(outboundLinkOutputChannel)
|
||||||
} else if *aggregator {
|
} else if *aggregator {
|
||||||
|
f, err := os.Create("/app/profile.pprof")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
fmt.Println("Starting profiling4")
|
||||||
|
pprof.StartCPUProfile(f)
|
||||||
socketHarOutChannel := make(chan *tap.OutputChannelItem, 1000)
|
socketHarOutChannel := make(chan *tap.OutputChannelItem, 1000)
|
||||||
filteredHarChannel := make(chan *tap.OutputChannelItem)
|
filteredHarChannel := make(chan *tap.OutputChannelItem)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user