Documentation ¶
Overview ¶
Package parse provides functions to parse LSP logs. Fully processed logs are returned by ToRLog().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromClient ¶
FromClient says if the message is from the client
func FromServer ¶
FromServer says if the message is from the server
func Notifs ¶
func Notifs(m string) interface{}
Notifs returns a pointer to a type suitable for Unmarshal
Types ¶
type LogHist ¶
type LogHist struct {
// contains filtered or unexported fields
}
LogHist gets ints, and puts them into buckets: <=10, <=30, 100, 300, 1000, ... It produces a historgram of elapsed times in milliseconds
type Logmsg ¶
type Logmsg struct { Type MsgType Method string ID string // for requests/responses. Client and server request ids overlap Elapsed string // for responses Hdr string // header. do we need to keep all these strings? Rest string // the unparsed result, with newlines or not Body interface{} // the parsed result }
Logmsg is the type of a parsed log entry.
type MsgType ¶
type MsgType int
MsgType is the type of message.
const ( // ClRequest from client to server has method and id ClRequest MsgType = iota // ClResponse from server to client ClResponse // SvRequest from server to client, has method and id SvRequest // SvResponse from client to server SvResponse // ToServer notification has method, but no id ToServer // ToClient notification ToClient // ReportErr is an error message ReportErr // errors have method and id )
type Rlog ¶
type Rlog struct { Logs []*Logmsg // In the order in the log file ServerCall map[string]*Logmsg // ID->Request, client->server ServerReply map[string]*Logmsg // ID->Response, server->client (includes Errors) ClientCall map[string]*Logmsg ClientReply map[string]*Logmsg ClientNotifs []*Logmsg ServerNotifs []*Logmsg Histogram *LogHist }
Rlog contains the processed logs
Click to show internal directories.
Click to hide internal directories.