This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'benchmark' | |
| def show_memory_consumption | |
| puts `pmap #{Process.pid} | tail -n 1` | |
| end | |
| #GC.disable | |
| result = Benchmark.measure do | |
| 200.times { |i| | |
| "a"*100_000_000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [sqlfluff] | |
| dialect = clickhouse | |
| templater = jinja | |
| sql_file_exts = .sql,.sql.j2,.dml,.ddl | |
| max_line_length = 140 | |
| ; exclude CO03 capitalisation.functions as sqlfluff does not have camelCase option used by ClickHouse. | |
| ; https://docs.sqlfluff.com/en/stable/rules.html#rule-CP03 | |
| ; exclude LT01 layout.spacing as it removes space alignment and adds space to `Nullable ()` call in some cases. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Colors | |
| RED = 31 | |
| GREEN = 32 | |
| YELLOW = 33 | |
| BLUE = 34 | |
| end | |
| class String | |
| def colorize(color_code) | |
| "\e[#{color_code}m#{self}\e[0m" |
OlderNewer