diff options
Diffstat (limited to 'scripts/merge-auto-explain-logs')
-rwxr-xr-x | scripts/merge-auto-explain-logs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/merge-auto-explain-logs b/scripts/merge-auto-explain-logs new file mode 100755 index 00000000000..0dff4fb33f8 --- /dev/null +++ b/scripts/merge-auto-explain-logs @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require "set" +require "json" + +fingerprints = Set.new + +ARGF.each_line do |line| + fingerprint = JSON.parse(line)['fingerprint'] + $stdout.puts(line) && $stdout.flush if fingerprints.add?(fingerprint) +end + +warn("auto_explain log contains #{fingerprints.size} entries") |