Skip to content

Instantly share code, notes, and snippets.

@shugo
Last active January 8, 2021 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shugo/acdf0ad713a6d5fafbf7c2cf6d01a7dd to your computer and use it in GitHub Desktop.
Save shugo/acdf0ad713a6d5fafbf7c2cf6d01a7dd to your computer and use it in GitHub Desktop.
Boot time of Textbringer
require "time"
t = Time.strptime(`LANG=C ps -eo pid,lstart`.slice(/^ *#$$ *(.*)/, 1), "%c")
i = Time.now - t
STDERR.reopen(File.expand_path("~/.textbringer/stderr.log"), "a")
STDERR.puts("Started in #{i} seconds: RUBY_VERSION=#{RUBY_VERSION}")
Started in 1.849722 seconds: RUBY_VERSION=2.7.2
Started in 1.47266 seconds: RUBY_VERSION=2.7.2
Started in 1.795692 seconds: RUBY_VERSION=2.7.2
Started in 1.673519 seconds: RUBY_VERSION=3.0.0
Started in 1.794389 seconds: RUBY_VERSION=3.0.0
Started in 1.063289 seconds: RUBY_VERSION=3.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment