func (c PhpOpcachePlugin) GraphDefinition() map[string]mp.Graphs {
	return graphdef
}
GraphDefinition interface for mackerelplugin
package mpphpopcache
import (
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"os"
	"strconv"
	"strings"
	mp "github.com/mackerelio/go-mackerel-plugin"
	"github.com/urfave/cli"
)
var graphdef = map[string]mp.Graphs{
	"php-opcache.memory_size": {
		Label: "PHP OPCache Memory Size",
		Unit:  "integer",
		Metrics: []mp.Metrics{
			{Name: "used_memory", Label: "Used Memory", Diff: false, Stacked: false},
			{Name: "free_memory", Label: "Free Memory", Diff: false, Stacked: false},
			{Name: "wasted_memory", Label: "Wasted Memory", Diff: false, Stacked: false},
		},
	},
	"php-opcache.memory": {
		Label: "PHP OPCache Memory Statistics",
		Unit:  "integer",
		Metrics: []mp.Metrics{
			{Name: "opcache_hit_rate", Label: "OPCache hit rate", Diff: false, Stacked: false},
			{Name: "current_wasted_percentage", Label: "Used Memory", Diff: false, Stacked: false},
		},
	},
	"php-opcache.cache_size": {
		Label: "PHP OPCache Cache Size",
		Unit:  "integer",
		Metrics: []mp.Metrics{
			{Name: "num_cached_scripts", Label: "Cached Script", Diff: false, Stacked: false},
			{Name: "num_cached_keys", Label: "Num Cached Key", Diff: false, Stacked: false},
			{Name: "max_cached_keys", Label: "Max Cached Key", Diff: false, Stacked: false},
		},
	},
	"php-opcache.stats": {
		Label: "PHP OPCache Cache Statistics",
		Unit:  "integer",
		Metrics: []mp.Metrics{
			{Name: "hits", Label: "Hits", Diff: true, Stacked: false},
			{Name: "misses", Label: "Misses", Diff: true, Stacked: false},
			{Name: "blacklist_misses", Label: "Blacklist Misses", Diff: true, Stacked: false},
		},
	},
}
type PhpOpcachePlugin struct {
	Host     string
	Port     uint16
	Path     string
	Tempfile string
}