Skip to content
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

[DRAFT] evt stress tool #4344

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,35 @@ clean-signatures:
# other commands
#

# evt

EVT_SRC_DIRS = ./cmd/evt/
EVT_SRC = $(shell find $(EVT_SRC_DIRS) \
-type f \
-name '*.go' \
! -name '*_test.go' \
)

.PHONY: evt
evt: $(OUTPUT_DIR)/evt

$(OUTPUT_DIR)/evt: \
$(EVT_SRC) \
$(OUTPUT_DIR)/tracee \
| .eval_goenv \
.checkver_$(CMD_GO) \
#
$(GO_ENV_EBPF) $(CMD_GO) build \
-ldflags="$(GO_DEBUG_FLAG) \
" \
-v -o $@ \
./cmd/evt

.PHONY: clean-evt
clean-evt:
#
$(CMD_RM) -rf $(OUTPUT_DIR)/evt

# tracee-bench

TRACEE_BENCH_SRC_DIRS = ./cmd/tracee-bench/
Expand Down
38 changes: 38 additions & 0 deletions cmd/evt/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package cmd

import (
"os"

"github.com/spf13/cobra"

"github.com/aquasecurity/tracee/cmd/evt/cmd/stress"
"github.com/aquasecurity/tracee/cmd/evt/cmd/trigger"
)

func init() {
rootCmd.AddCommand(stress.Cmd())
rootCmd.AddCommand(trigger.Cmd())
}

var (
rootCmd = &cobra.Command{
Use: "evt",
Short: "An event stress testing tool",
Long: "evt is a simple testing tool that generates events to stress the system",
}
)

func initRootCmd() error {
rootCmd.SetOutput(os.Stdout)
rootCmd.SetErr(os.Stderr)

return nil
}

func Execute() error {
if err := initRootCmd(); err != nil {
return err
}

return rootCmd.Execute()
}
Loading
Loading