Skip to content

Commit

Permalink
Add more variants to error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Jul 27, 2023
1 parent 6c85a07 commit 513d5d8
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions benchmarks/fluentd/benchmark.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
require 'fluent/parser'

# Prepare a fixture
ltsv = 1000000.times.map do
"time:2022-08-07 07:38:31,842 module:main.py level:DEBUG message:No kernel command line url found.\n"
end.join
time = Time.new(2023, 7, 27, 9, 00, 00)
errors = [
"Consuming user data failed!",
"Failed to initialize, likely bad things to come!",
"No instance datasource found.",
"No kernel command line url found.",
"No local datasource found",
"Python version change detected. Purging cache",
"Skipping user-data validation. No user-data found.",
"Writing python-version file. Cache compatibility status is currently unknown.",
"di_report was None.",
"no 'datasource_list' found in di_report.",
]
ltsv = 1000.times.map { |i| "time:#{time + i} module:main.py level:DEBUG message:#{errors.sample}\n" }.join
ltsv *= 1000

# Prepare an LTSV parser
parser = Fluent::Plugin::LabeledTSVParser.new
Expand Down

0 comments on commit 513d5d8

Please sign in to comment.