Skip to content

Commit cc0cfeb

Browse files
committed
Quick'n'dirty script to analyze logs for buffer flushing
1 parent 55deef9 commit cc0cfeb

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ llm
6363
.yarn/build-state.yml
6464
.yarn/unplugged
6565
.pnp.*
66+
lib/scripts/*.txt

‎lib/scripts/log_parser.rb‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env ruby
2+
3+
filename = ARGV[0] || "log.txt"
4+
5+
begin
6+
File.foreach(filename) do |line|
7+
puts line if line.include?("%%%%%")
8+
end
9+
rescue Errno::ENOENT
10+
puts "Error: File '#{filename}' not found"
11+
exit 1
12+
rescue => e
13+
puts "Error: #{e.message}"
14+
exit 1
15+
end

0 commit comments

Comments
 (0)