kelora 0.3.0

A command-line log analysis tool with embedded Rhai scripting
# Makefile for kelora

.PHONY: all build test test-unit test-integration test-full clean help install bench bench-quick bench-baseline

# Default target
all: build test

# Build the project
build:
	@echo "๐Ÿ”จ Building kelora..."
	cargo build --release

# Run all tests
test: test-unit test-integration

# Run only unit tests
test-unit:
	@echo "๐Ÿงช Running unit tests..."
	cargo test --lib

# Run only integration tests
test-integration:
	@echo "๐Ÿ”„ Running integration tests..."
	cargo test --test integration_tests

# Run comprehensive test suite (includes manual tests)
test-full:
	@echo "๐Ÿš€ Running comprehensive test suite..."
	@chmod +x test_kelora.sh
	./test_kelora.sh

# Clean build artifacts
clean:
	@echo "๐Ÿงน Cleaning build artifacts..."
	cargo clean

# Install dependencies and setup
install:
	@echo "๐Ÿ“ฆ Installing dependencies..."
	cargo fetch

# Run clippy for code quality
lint:
	@echo "๐Ÿ” Running clippy..."
	cargo clippy -- -D warnings

# Format code
fmt:
	@echo "โœจ Formatting code..."
	cargo fmt

# Check everything (format, lint, test)
check: fmt lint test

# Run the application with sample data
demo:
	@echo "๐ŸŽฌ Running demo..."
	@echo '{"timestamp":"2023-07-18T15:04:23.456Z","level":"ERROR","message":"Demo error","component":"test"}' | cargo run -- -f json -c
	@echo '{"timestamp":"2023-07-18T15:04:24.456Z","level":"INFO","message":"Demo info","component":"test"}' | cargo run -- -f json -c

# Run performance benchmarks
bench: build
	@echo "โšก Running performance benchmarks..."
	@chmod +x benchmarks/run_benchmarks.sh
	./benchmarks/run_benchmarks.sh

# Run quick performance benchmarks
bench-quick: build
	@echo "โšก Running quick benchmarks..."
	@chmod +x benchmarks/run_benchmarks.sh
	./benchmarks/run_benchmarks.sh --quick

# Update performance baseline
bench-baseline: build
	@echo "๐Ÿ“Š Updating performance baseline..."
	@chmod +x benchmarks/run_benchmarks.sh
	./benchmarks/run_benchmarks.sh --update-baseline

# Show help
help:
	@echo "Kelora Makefile Commands:"
	@echo ""
	@echo "  make build          - Build the project"
	@echo "  make test           - Run unit and integration tests"
	@echo "  make test-unit      - Run only unit tests"
	@echo "  make test-integration - Run only integration tests"
	@echo "  make test-full      - Run comprehensive test suite with manual tests"
	@echo "  make lint           - Run clippy for code quality"
	@echo "  make fmt            - Format code"
	@echo "  make check          - Run format, lint, and test"
	@echo "  make demo           - Run a quick demo"
	@echo "  make bench          - Run performance benchmarks"
	@echo "  make bench-quick    - Run quick benchmarks (10k dataset)"
	@echo "  make bench-baseline - Update performance baseline"
	@echo "  make clean          - Clean build artifacts"
	@echo "  make install        - Install dependencies"
	@echo "  make help           - Show this help"