-
Notifications
You must be signed in to change notification settings - Fork 202
Add FunctionStats to rueidiscompat #772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Implemented FunctionStats in rueidiscompat to enhance functionality. -Ensured compatibility with existing code and followed project conventions.
rueidiscompat/command.go
Outdated
} | ||
|
||
func (cmd *FunctionStatsCmd) from(res rueidis.RedisResult) { | ||
fstats := new(FunctionStats) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fstats := new(FunctionStats) | |
var fstats FunctionStats |
rueidiscompat/command.go
Outdated
case "command": | ||
val.Command, err = attr.AsStrSlice() | ||
case "duration_ms": | ||
ms, err := attr.ToInt64() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ms, err := attr.ToInt64() | |
ms, err := attr.AsInt64() |
rueidiscompat/command.go
Outdated
for k, v := range emap { | ||
switch k { | ||
case "libraries_count": | ||
engine.LibrariesCount, err = v.ToInt64() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
engine.LibrariesCount, err = v.ToInt64() | |
engine.LibrariesCount, err = v.AsInt64() |
rueidiscompat/command.go
Outdated
case "libraries_count": | ||
engine.LibrariesCount, err = v.ToInt64() | ||
case "functions_count": | ||
engine.FunctionsCount, err = v.ToInt64() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
engine.FunctionsCount, err = v.ToInt64() | |
engine.FunctionsCount, err = v.AsInt64() |
rueidiscompat/command.go
Outdated
case "name": | ||
val.Name, err = v.ToString() | ||
case "duration_ms": | ||
ms, err := v.ToInt64() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ms, err := v.ToInt64() | |
ms, err := v.AsInt64() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Thank you @kendriyavid.
Uh oh!
There was an error while loading. Please reload this page.