File: cr_lf.rb

package info (click to toggle)
ruby-excon 0.112.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,232 kB
  • sloc: ruby: 7,855; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 349 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'rubygems'
require 'tach'

CR_LF = "\r\n"

Tach.meter(1_000_000) do
  tach('constant') do
    '' << CR_LF
  end
  tach('string') do
    '' << "\r\n"
  end
end

# +----------+----------+
# | tach     | total    |
# +----------+----------+
# | constant | 0.819885 |
# +----------+----------+
# | string   | 0.893602 |
# +----------+----------+