Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
geyslan committed Oct 14, 2024
1 parent 1251004 commit 28dda9c
Show file tree
Hide file tree
Showing 49 changed files with 989 additions and 127 deletions.
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,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
147 changes: 80 additions & 67 deletions api/v1beta1/diagnostic.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions api/v1beta1/diagnostic.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ message GetMetricsResponse {
uint64 EventsFiltered = 2;
uint64 NetCapCount = 3;
uint64 BPFLogsCount = 4;
uint64 BPFPerfEventWrites = 5;
uint64 ErrorCount = 6;
uint64 LostEvCount = 7;
uint64 LostWrCount = 8;
uint64 LostNtCapCount = 9;
uint64 LostBPFLogsCount = 10;
uint64 BPFPerfEventWriteAttempts = 5;
uint64 BPFPerfEventWriteFailures = 6;
uint64 ErrorCount = 7;
uint64 LostEvCount = 8;
uint64 LostWrCount = 9;
uint64 LostNtCapCount = 10;
uint64 LostBPFLogsCount = 11;
}

enum LogLevel {
Expand Down
36 changes: 36 additions & 0 deletions cmd/evt/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package cmd

import (
"os"

"github.com/spf13/cobra"

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

func init() {
rootCmd.AddCommand(stress.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

0 comments on commit 28dda9c

Please sign in to comment.