mirror of
https://github.com/jimeh/rbheap.git
synced 2026-02-19 12:56:46 +00:00
Rename project to rbheap
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
project_name: rbheapleak
|
project_name: rbheap
|
||||||
builds:
|
builds:
|
||||||
- main: main.go
|
- main: main.go
|
||||||
binary: rbheapleak
|
binary: rbheap
|
||||||
flags: -a
|
flags: -a
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -1,6 +1,6 @@
|
|||||||
DEV_DEPS = github.com/mailru/easyjson/...
|
DEV_DEPS = github.com/mailru/easyjson/...
|
||||||
|
|
||||||
NAME = rbheapleak
|
NAME = rbheap
|
||||||
BINARY = bin/${NAME}
|
BINARY = bin/${NAME}
|
||||||
VERSION ?= $(shell cat VERSION)
|
VERSION ?= $(shell cat VERSION)
|
||||||
|
|
||||||
@@ -31,11 +31,11 @@ clean:
|
|||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
go test
|
go test ./...
|
||||||
|
|
||||||
.PHONY: generate
|
.PHONY: generate
|
||||||
generate: dev-deps
|
generate: dev-deps
|
||||||
go generate
|
go generate ./...
|
||||||
|
|
||||||
#
|
#
|
||||||
# EasyJSON targets.
|
# EasyJSON targets.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/jimeh/rbheapleak/leak"
|
"github.com/jimeh/rbheap/leak"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ type BuildInfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "rbheapleak",
|
Use: "rbheap",
|
||||||
Short: "rbheapleak analyzes ObjectSpace dumps from Ruby processes.",
|
Short: "rbheap analyzes ObjectSpace dumps from Ruby processes.",
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
SilenceErrors: true,
|
SilenceErrors: true,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package leak
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/jimeh/rbheapleak/obj"
|
"github.com/jimeh/rbheap/obj"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewFinder(file1, file2, file3 string) *Finder {
|
func NewFinder(file1, file2, file3 string) *Finder {
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/jimeh/rbheapleak/cmd"
|
"github.com/jimeh/rbheap/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ package obj
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
json "encoding/json"
|
json "encoding/json"
|
||||||
|
|
||||||
easyjson "github.com/mailru/easyjson"
|
easyjson "github.com/mailru/easyjson"
|
||||||
jlexer "github.com/mailru/easyjson/jlexer"
|
jlexer "github.com/mailru/easyjson/jlexer"
|
||||||
jwriter "github.com/mailru/easyjson/jwriter"
|
jwriter "github.com/mailru/easyjson/jwriter"
|
||||||
@@ -18,7 +17,7 @@ var (
|
|||||||
_ easyjson.Marshaler
|
_ easyjson.Marshaler
|
||||||
)
|
)
|
||||||
|
|
||||||
func easyjsonE44bcf2dDecodeGithubComJimehRbheapleak(in *jlexer.Lexer, out *Object) {
|
func easyjsonE44bcf2dDecodeGithubComJimehRbheapObj(in *jlexer.Lexer, out *Object) {
|
||||||
isTopLevel := in.IsStart()
|
isTopLevel := in.IsStart()
|
||||||
if in.IsNull() {
|
if in.IsNull() {
|
||||||
if isTopLevel {
|
if isTopLevel {
|
||||||
@@ -51,7 +50,7 @@ func easyjsonE44bcf2dDecodeGithubComJimehRbheapleak(in *jlexer.Lexer, out *Objec
|
|||||||
in.Consumed()
|
in.Consumed()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func easyjsonE44bcf2dEncodeGithubComJimehRbheapleak(out *jwriter.Writer, in Object) {
|
func easyjsonE44bcf2dEncodeGithubComJimehRbheapObj(out *jwriter.Writer, in Object) {
|
||||||
out.RawByte('{')
|
out.RawByte('{')
|
||||||
first := true
|
first := true
|
||||||
_ = first
|
_ = first
|
||||||
@@ -81,23 +80,23 @@ func easyjsonE44bcf2dEncodeGithubComJimehRbheapleak(out *jwriter.Writer, in Obje
|
|||||||
// MarshalJSON supports json.Marshaler interface
|
// MarshalJSON supports json.Marshaler interface
|
||||||
func (v Object) MarshalJSON() ([]byte, error) {
|
func (v Object) MarshalJSON() ([]byte, error) {
|
||||||
w := jwriter.Writer{}
|
w := jwriter.Writer{}
|
||||||
easyjsonE44bcf2dEncodeGithubComJimehRbheapleak(&w, v)
|
easyjsonE44bcf2dEncodeGithubComJimehRbheapObj(&w, v)
|
||||||
return w.Buffer.BuildBytes(), w.Error
|
return w.Buffer.BuildBytes(), w.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||||
func (v Object) MarshalEasyJSON(w *jwriter.Writer) {
|
func (v Object) MarshalEasyJSON(w *jwriter.Writer) {
|
||||||
easyjsonE44bcf2dEncodeGithubComJimehRbheapleak(w, v)
|
easyjsonE44bcf2dEncodeGithubComJimehRbheapObj(w, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalJSON supports json.Unmarshaler interface
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||||||
func (v *Object) UnmarshalJSON(data []byte) error {
|
func (v *Object) UnmarshalJSON(data []byte) error {
|
||||||
r := jlexer.Lexer{Data: data}
|
r := jlexer.Lexer{Data: data}
|
||||||
easyjsonE44bcf2dDecodeGithubComJimehRbheapleak(&r, v)
|
easyjsonE44bcf2dDecodeGithubComJimehRbheapObj(&r, v)
|
||||||
return r.Error()
|
return r.Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||||
func (v *Object) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
func (v *Object) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||||
easyjsonE44bcf2dDecodeGithubComJimehRbheapleak(l, v)
|
easyjsonE44bcf2dDecodeGithubComJimehRbheapObj(l, v)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user