From Mexico.purplecow.org
(Difference between revisions)
(inprogress) |
Current revision (23:18, 12 October 2010) (view source) m |
||
(One intermediate revision not shown.) | |||
Line 1: | Line 1: | ||
= System call breakdown for ruby's "gem" command = | = System call breakdown for ruby's "gem" command = | ||
+ | == Overview == | ||
Called with no parameters - the sole actual work is to print usage information. It takes a long time, so let's have a look at what happens: | Called with no parameters - the sole actual work is to print usage information. It takes a long time, so let's have a look at what happens: | ||
+ | == A quick truss == | ||
<pre> | <pre> | ||
$ truss gem >rubygem.truss 2>&1 | $ truss gem >rubygem.truss 2>&1 | ||
Line 12: | Line 14: | ||
4836 rubygem.truss | 4836 rubygem.truss | ||
</pre> | </pre> | ||
+ | |||
+ | == Breakdown == | ||
Oh dear! So what is it actually doing? | Oh dear! So what is it actually doing? | ||
+ | * brk: 701 | ||
+ | * close: 553 | ||
+ | * stat: 1371 | ||
+ | * llseek: 535 | ||
+ | * read: 889 | ||
+ | * open: 656 | ||
+ | * write: 22 (That's actually printing the usage information) | ||
+ | * other: 234 (mainly mmap) | ||
+ | == A graph == | ||
[[image:rubygempie.png]] | [[image:rubygempie.png]] |
Current revision
System call breakdown for ruby's "gem" command
Overview
Called with no parameters - the sole actual work is to print usage information. It takes a long time, so let's have a look at what happens:
A quick truss
$ truss gem >rubygem.truss 2>&1 $ grep -c open rubygem.truss 656 $ grep -c stat rubygem.truss 1372 $ wc -l rubygem.truss 4836 rubygem.truss
Breakdown
Oh dear! So what is it actually doing?
- brk: 701
- close: 553
- stat: 1371
- llseek: 535
- read: 889
- open: 656
- write: 22 (That's actually printing the usage information)
- other: 234 (mainly mmap)