diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-01-27 00:30:23 +0100 |
---|---|---|
committer | Kirill Chibisov <contact@kchibisov.com> | 2020-01-27 02:30:23 +0300 |
commit | 0f15dc05d9332bb9dc71bd9b70bc737da2dc33c5 (patch) | |
tree | 481e2fd0559aad8f588d0a9ac075ccfc47d4efb9 /scripts/migrate_ref_tests.rb | |
parent | 4cc6421daa4ff5976ab43c67110a7a80a36541e5 (diff) | |
download | r-alacritty-0f15dc05d9332bb9dc71bd9b70bc737da2dc33c5.tar.gz r-alacritty-0f15dc05d9332bb9dc71bd9b70bc737da2dc33c5.tar.bz2 r-alacritty-0f15dc05d9332bb9dc71bd9b70bc737da2dc33c5.zip |
Switch to flamegraph-rs script
This cleans up the Alacritty scripts a bit by removing some of them
which are not recommended to be used anymore and switching from the
official FlameGraph tool to the more specialized Rust FlameGraph
implementation.
Diffstat (limited to 'scripts/migrate_ref_tests.rb')
-rwxr-xr-x | scripts/migrate_ref_tests.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/scripts/migrate_ref_tests.rb b/scripts/migrate_ref_tests.rb deleted file mode 100755 index 5ed02893..00000000 --- a/scripts/migrate_ref_tests.rb +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env ruby - -require 'json' - -Dir.glob('./tests/ref/**/grid.json').each do |path| - puts "Migrating #{path}" - - # Read contents - s = File.open(path) { |f| f.read } - - # Parse - grid = JSON.parse(s) - - # Normalize Storage serialization - if grid['raw'].is_a? Array - grid['raw'] = { - 'inner' => grid['raw'][0], - 'zero' => grid['raw'][1], - 'visible_lines' => grid['raw'][2] - } - end - - # Migrate Row serialization - grid['raw']['inner'].map! do |row| - if row.is_a? Hash - row - else - { inner: row, occ: row.length } - end - end - - # Write updated grid - File.open(path, 'w') { |f| f << JSON.generate(grid) } -end |