Skip to content

Instantly share code, notes, and snippets.

View goncalossilva's full-sized avatar
🚀

Gonçalo Silva goncalossilva

🚀
View GitHub Profile
dx --dex --num-threads=4 --output app/build/intermediates/dex/google/debug app/build/intermediates/classes/google/debug app/build/intermediates/dependency-cache/google/debug /build/intermediates/pre-dexed/google/debug/bugsense-3.6.1-dab08a48400319f720951c05a15093fa84d1639a.jar app/build/intermediates/pre-dexed/google/debug/classes-05334bb2a2664029bf7f4b2da6361c325c5476bf.jar app/build/intermediates/pre-dexed/google/debug/classes-200692cdc7d950e2e88177c4883b3f93381dd231.jar app/build/intermediates/pre-dexed/google/debug/classes-36539e46b9820907d51e2e52f0833f7c33debd3a.jar app/build/intermediates/pre-dexed/google/debug/classes-40a260ec86147cc79755d457bde057edb0f07abe.jar app/build/intermediates/pre-dexed/google/debug/classes-46ca0b7dc2b826d4414c2d3d0cacdc4c5257c6d8.jar app/build/intermediates/pre-dexed/google/debug/classes-5128cf04b649594e4626c110d0543bc798c591d0.jar app/build/intermediates/pre-dexed/google/debug/classes-57782c1351a42037a9d41431771c41ad7b72ae07.jar app/build/intermediates/pre-dexed/google/debug
### Keybase proof
I hereby claim:
* I am goncalossilva on github.
* I am goncalossilva (https://keybase.io/goncalossilva) on keybase.
* I have a public key whose fingerprint is C272 B075 3313 6571 5980 70A5 4AC5 F859 0A77 0315
To claim this, I am signing this object:
GCdata
1.9.2: http://github.com/wycats/ruby-prof/blob/master/patches/gcdata/ruby192gc.patch
1.9.3: http://github.com/wycats/ruby-prof/blob/master/patches/gcdata/ruby193gc.patch
Zero-copy context switching
1.8.6: http://timetobleed.com/files/186-hs.patch
1.8.7: http://timetobleed.com/files/187-hs.patch
MBARI
1.6.8:http://sites.google.com/site/brentsrubypatches/Home/ruby-1.6.8-mbari8B.patch?attredirects=0&d=1
Test applications live under ci/benchmark/* (and ignored with .gitignore)
1. rails generate benchmarking_data
2. rails generate benchmarking_routes (depends on 1. for PUT/DELETE)
3. rails generate benchmarking_ci (runs 1. and 2.)
4. rake benchmark
1.
- Checks if test/fixtures/rails_benchmarking_ci/data/* was not already automatically generated
- Generates fake data automatically and stores it in test/fixtures/rails_benchmarking_ci/data/*
(05:59) gsilva ~/Projects/redmine[rails3] $ time rails generate dummy:all
successful initialize Rails application
create test/dummy/data
successful generate 20 records for 'workflow'
successful generate 10 records for 'project'
successful generate 20 records for 'version'
successful generate 10 records for 'setting'
successful generate 40 records for 'journal'
successful generate 10 records for 'project_custom_field'
successful generate 40 records for 'comment'
---
total_time: 0.43
threads:
78550710:
total_time: 0.43
methods:
Global#[No method]:
calls: 1
total_time: 0.43
self_time: 0.0
From 53f2f7aef15c89f60a6a75b2b55cd124600d0c23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gon=C3=A7alo=20Silva?= <goncalossilva@gmail.com>
Date: Mon, 3 Jan 2011 18:51:57 +0000
Subject: [PATCH] use clock_gettime() instead of clock() when measuring process time under Linux
clock() limits it to centisecond precision on Linux
---
ext/ruby_prof/measure_process_time.h | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
class Array
def trollface
puts <<-EOTF
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
# wtf
Psych::ScalarScanner.new.tokenize("2011-02-24 11:17:06 -0800")
=> 2011-03-29 20:17:06 +0100
# this date format is important because of git
(19:43) goncalossilva ~/Desktop/rails[master] $ git show -s --pretty=format:"%ci" 13547c16d97b5f52db11d9f48704bbea20b54a4c
2011-02-24 11:17:06 -0800
rbx-head :037 > lb = Rubinius::Agent.loopback
=> #<Rubinius::Agent:0x1884 @decoder=#<BERT::Decode:0x1888 @in=#<IO:0x188c> @peeked=""> @io=#<IO:0x188c> @encoder=#<BERT::Encode:0x1894 @out=#<IO:0x188c>>>
rbx-head :038 > lb.get("system.memory.counter.bytes").last # this is memory
=> 45022024
rbx-head :040 > lb.get("system.memory.counter.objects").last # this is the amount of object allocations
=> 1367753
rbx-head :041 > lb.get("system.gc.full.count").last + lb.get("system.gc.young.count").last # this is the amount of gc runs
=> 13
rbx-head :042 > lb.get("system.gc.full.wallclock").last + lb.get("system.gc.young.wallclock").last # and the amount of time spent gcing
=> 217