Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@

package metrics

import "fmt"
import "io"
import "os"
import "time"
import "bytes"
import "net"
import "net/url"
import "net/http"
import "path/filepath"
import "github.com/go-logr/logr"
import "github.com/VictoriaMetrics/metrics"
import "github.com/xtaci/kcp-go/v5"
import (
"bytes"
"fmt"
"io"
"net"
"net/http"
"net/url"
"os"
"path/filepath"
"time"

"github.com/VictoriaMetrics/metrics"
"github.com/go-logr/logr"
"github.com/xtaci/kcp-go/v5"
)

// these are exported by the daemon for various analysis
var Version string //this is later converted to metrics format
Expand Down Expand Up @@ -83,10 +86,16 @@ func writePrometheusMetrics(w io.Writer) {
fmt.Fprintf(w, "KCP_EarlyRetransSegs %d\n", kcp.DefaultSnmp.EarlyRetransSegs)
fmt.Fprintf(w, "KCP_LostSegs %d\n", kcp.DefaultSnmp.LostSegs)
fmt.Fprintf(w, "KCP_RepeatSegs %d\n", kcp.DefaultSnmp.RepeatSegs)
fmt.Fprintf(w, "KCP_FECFullShardSet %d\n", kcp.DefaultSnmp.FECFullShardSet)
fmt.Fprintf(w, "KCP_FECRecovered %d\n", kcp.DefaultSnmp.FECRecovered)
fmt.Fprintf(w, "KCP_FECErrs %d\n", kcp.DefaultSnmp.FECErrs)
fmt.Fprintf(w, "KCP_FECParityShards %d\n", kcp.DefaultSnmp.FECParityShards)
fmt.Fprintf(w, "KCP_FECShortShards %d\n", kcp.DefaultSnmp.FECShortShards)
fmt.Fprintf(w, "KCP_FECShardSet %d\n", kcp.DefaultSnmp.FECShardSet)
fmt.Fprintf(w, "KCP_FECShardMin %d\n", kcp.DefaultSnmp.FECShardMin)
fmt.Fprintf(w, "KCP_RingBufferSndQueue %d\n", kcp.DefaultSnmp.RingBufferSndQueue)
fmt.Fprintf(w, "KCP_RingBufferRcvQueue %d\n", kcp.DefaultSnmp.RingBufferRcvQueue)
fmt.Fprintf(w, "KCP_RingBufferSndBuffer %d\n", kcp.DefaultSnmp.RingBufferSndBuffer)
fmt.Fprintf(w, "KCP_OOBPackets %d\n", kcp.DefaultSnmp.OOBPackets)

}

Expand Down
13 changes: 0 additions & 13 deletions vendor/github.com/templexxx/cpu/.gitignore

This file was deleted.

32 changes: 0 additions & 32 deletions vendor/github.com/templexxx/cpu/LICENSE

This file was deleted.

23 changes: 0 additions & 23 deletions vendor/github.com/templexxx/cpu/README.md

This file was deleted.

235 changes: 0 additions & 235 deletions vendor/github.com/templexxx/cpu/cpu.go

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/github.com/templexxx/cpu/cpu_386.go

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/github.com/templexxx/cpu/cpu_amd64.go

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/github.com/templexxx/cpu/cpu_amd64p32.go

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/github.com/templexxx/cpu/cpu_arm.go

This file was deleted.

Loading