Commit graph

425 commits

Author SHA1 Message Date
ppom
60a65e782d
Match: Vec -> SmallVec 2025-06-27 12:00:00 +02:00
ppom
359957c58c
README: Add trigger command 2025-06-24 12:00:00 +02:00
ppom
3f3236cafb
v2.1.0 v2.1.0 2025-06-24 12:00:00 +02:00
ppom
78056b6fc5
src/client/request.rs rename and ARCHITECTURE.md update 2025-06-24 12:00:00 +02:00
ppom
6a778f3d01
cargo fmt, cargo clippy --all-targets 2025-06-24 12:00:00 +02:00
ppom
35862d32fa
Fix trigger command
- Force STREAM.FILTER one the command line
- Fix typo
2025-06-24 12:00:00 +02:00
ppom
283d1867b8
Benchmark: Add real-life configuration file and benchmark wrapper
Performance on this real-life configuration:

Before last commit:
Service runtime: 2min 22.669s
CPU time consumed: 3min 44.299s
Memory peak: 50.7M (swap: 0B)

With last commit:
Service runtime: 7.569s
CPU time consumed: 21.998s
Memory peak: 105.6M (swap: 0B)
2025-06-23 12:00:00 +02:00
ppom
ad6b0faa30
Performance: Use a RegexSet for all regexes of a Stream
StreamManager is now a struct that has its own RegexSet created from all
the regexes inside its Filters. Instead of calling
FilterManager::handle_line on all its FilterManagers, resulting in m*n
regex passes, it matches on all the regexes with its RegexSet.
It then only calls FilterManager::handle_line on matching Filters.

This should increase performance in those cases:
- Streams with a lot of filters or a lot of regexes
- Filters that match a small proportion of their Stream lines

This may decrease performance when most of lines are matched by all
Filters of a Stream.
2025-06-23 12:00:00 +02:00
ppom
55ed7b9c5f
Amend heavy-load test
- Add wrapper script
- Add non-matching lines
- Put two filters on the same stream, where either one of them matches
2025-06-23 12:00:00 +02:00
Baptiste Careil
d12a61c14a Fix #124: discard invalid utf8 sequences from input streams 2025-06-23 19:13:49 +00:00
Baptiste Careil
d4ffae8489 Fix #126: make config evaluation order predictable 2025-06-23 20:07:17 +02:00
ppom
529e40acd4
move State into its own file
This permit to reduce filter/mod.rs file size
2025-06-23 12:00:00 +02:00
ppom
39ae570ae5
rename file 2025-06-23 12:00:00 +02:00
ppom
4cb69fb0d4
Add test for trigger command 2025-06-23 12:00:00 +02:00
ppom
fad9ce1166
Add unit tests to FilterManager::handle_trigger 2025-06-23 12:00:00 +02:00
ppom
ff8ea60ce6
WIP trigger command and ignoreregex performance improvement
- ignoreregex is now a RegexSet for improved performance
- Vec::clear() replaced by new Vec to really free RAM
2025-06-23 12:00:00 +02:00
ppom
b0c307a9d2
WIP trigger command 2025-06-23 12:00:00 +02:00
ppom
731ad6ddfd
Simplify parse_duration tests by using appropriate units 2025-06-23 12:00:00 +02:00
ppom
0ff8fda607
cargo fmt, cargo clippy --all-targets 2025-06-17 12:00:00 +02:00
ppom
9963ef4192
Improve error message for retry < 2.
Fixes #125
2025-06-17 12:00:00 +02:00
ppom
ff84a31a7d
build: use CC env var if available. defaults to cc instead of gcc 2025-06-15 12:00:00 +02:00
ppom
0d9fc47016
Update duration format documentation
As it's no longer Go's format
2025-06-10 12:00:00 +02:00
ppom
5bccdb5ba7
Add oneshot option for actions
Fixes #92
2025-06-10 12:00:00 +02:00
ppom
cc38c55fdb
Add test-config subcommand to README 2025-06-06 12:00:00 +02:00
ppom
c04168d4dc
Fix outdated links in README 2025-06-06 12:00:00 +02:00
ppom
2e9e7a2a7b
Remove old go codebase 2025-06-06 12:00:00 +02:00
ppom
e642620ae3
Cross-compile C binaries too 2025-06-06 12:00:00 +02:00
ppom
8f5511b415
v2.0.1 2025-06-05 12:00:00 +02:00
ppom
388d4dac90
Fix tarball Makefile, release.py
- Makefile creates missing directories
- release.py puts tarballs & debs in local/ directory when not
  publishing
2025-06-05 12:00:00 +02:00
ppom
f63502759f
make official release only with --publish flag 2025-06-05 12:00:00 +02:00
ppom
74280d0f45
Fix completions filenames and their removal 2025-06-05 12:00:00 +02:00
Martin
8543fead54 Fix makefile install
remove duplicated /man/man1
otherwise, get an error during installation
install: target '/usr/local/share/man/man1/man/man1/': No such file or directory

Use -D to create missing directory
2025-06-05 16:52:09 +02:00
ppom
3beca6d7a5
Document state_directory
Fixes #71
2025-06-05 12:00:00 +02:00
ppom
b53044323c
Add small doc for C helpers 2025-06-05 12:00:00 +02:00
ppom
02f13a263e
fix release 2025-06-05 12:00:00 +02:00
ppom
d4fb820cb7
version 2.0.0 v2.0.0 2025-06-05 12:00:00 +02:00
ppom
da884029e6
Fix git not sorting tags correctly 2025-06-05 12:00:00 +02:00
ppom
bc078471a9
NLnet statement 2025-06-01 12:00:00 +02:00
ppom
daf1bf3818
Update configuration
- README.md: update minimal example (was outdated since a long time 🤐)
- README.md: link to Security part of the wiki
- README.md: fix OpenBSD broken link
- README.md: add `state_directory` option
- activitywatch & server configs: remove from config directory. only
  available in the wiki.
- heavy-load: move to new bench directory
- test: move to tests directory

Fix #121
2025-05-31 12:00:00 +02:00
ppom
ebad317a97
Config: fix state_directory and concurrency merging 2025-05-28 12:00:00 +02:00
ppom
9152c95b03
Change error wording again 2025-05-28 12:00:00 +02:00
ppom
8ffbcad1b9
Add test-config man page 2025-05-28 12:00:00 +02:00
ppom
f7bd28e46e
Config: cleanup code 2025-05-28 12:00:00 +02:00
ppom
73ffcb97ab
Update CLI help messages 2025-05-28 12:00:00 +02:00
ppom
283d5c0f13
delete note files 2025-05-28 12:00:00 +02:00
ppom
1a5548c871
Reorder Config fields for test-config command
This order looks more readable to me, with:
- one line options at the beginning of config
- streams at the end of config
- filters at the end of streams
- actions at the end of filters
2025-05-28 12:00:00 +02:00
ppom
4f2eac2788
Change error wording 2025-05-28 12:00:00 +02:00
Baptiste Careil
231c9f8a99
Add test-config sub-command 2025-05-28 12:00:00 +02:00
Baptiste Careil
cf96fa30f1
Add test directory for reading configuration files from a directory 2025-05-28 12:00:00 +02:00
Baptiste Careil
28b3a173bb
Add ability to read config from multiple files in a same directory 2025-05-28 12:00:00 +02:00