-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Wasm Plugin Framework (#586)
* feat: update wasm plugin * feat: update wasm plugin * feat: update wasm plugin * feat: update wasm plugin * feat: update wasm plugin * feat: update wasm plugin * feat: update wasm plugin * feat: update wasm plugin * feat: update wasm plugin * feat: update wasm plugin * feat: update wasm plugin * feat: remove skip_filter * feat: fix testcase * feat: use gauge instead of counter for wasm memory size
- Loading branch information
Showing
17 changed files
with
124 additions
and
717 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package tabletserver | ||
|
||
import ( | ||
"time" | ||
"vitess.io/vitess/go/stats" | ||
"vitess.io/vitess/go/vt/servenv" | ||
) | ||
|
||
type ActionStats struct { | ||
FilterBeforeExecutionTiming *servenv.TimingsWrapper | ||
FilterAfterExecutionTiming *servenv.TimingsWrapper | ||
FilterErrorCounts *stats.CountersWithSingleLabel | ||
FilterQPSRates *stats.Rates | ||
FilterWasmMemorySize *stats.GaugesWithMultiLabels | ||
} | ||
|
||
func NewActionStats(exporter *servenv.Exporter) *ActionStats { | ||
stats := &ActionStats{ | ||
FilterBeforeExecutionTiming: exporter.NewTimings("FilterBeforeExecution", "Filter before execution timings", "Name"), | ||
FilterAfterExecutionTiming: exporter.NewTimings("FilterAfterExecution", "Filter before execution timings", "Name"), | ||
FilterErrorCounts: exporter.NewCountersWithSingleLabel("FilterErrorCounts", "filter error counts", "Name"), | ||
FilterWasmMemorySize: exporter.NewGaugesWithMultiLabels("FilterWasmMemorySize", "Wasm memory size", []string{"Name", "BeforeOrAfter"}), | ||
} | ||
stats.FilterQPSRates = exporter.NewRates("FilterQps", stats.FilterBeforeExecutionTiming, 15*60/5, 5*time.Second) | ||
return stats | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.