Skip to content

Instantly share code, notes, and snippets.

View lloyd's full-sized avatar

Lloyd Hilaiel lloyd

View GitHub Profile
Average active users simulated over the last 1s/5s/60s:
[994ms] 0.00 0.00 0.00 46 R, 46 S (0sp 0rs 0al 0rh 11sn 32iy 0cs 3ia)
[769ms] 99360.00 99360.00 99360.00 46 R, 46 S (0sp 0rs 0al 0rh 6sn 38iy 0cs 2ia)
[634ms] 99360.00 99360.00 99360.00 46 R, 46 S (0sp 0rs 0al 1rh 11sn 34iy 0cs 0ia)
[494ms] 99360.00 99360.00 99360.00 47 R, 47 S (1sp 0rs 1al 0rh 9sn 34iy 0cs 2ia)
[374ms] 101520.00 99900.00 99900.00 46 R, 46 S (2sp 0rs 0al 0rh 8sn 36iy 0cs 0ia)
[296ms] 99360.00 99792.00 99792.00 47 R, 47 S (0sp 0rs 0al 0rh 12sn 35iy 0cs 0ia)
[240ms] 101621.52 100157.90 100096.92 46 R, 46 S (0sp 0rs 0al 1rh 8sn 36iy 0cs 1ia)
[205ms] 99459.36 100018.20 100005.84 46 R, 46 S (0sp 0rs 0al 0rh 5sn 41iy 0cs 0ia)
[179ms] 99360.00 99886.56 99925.11 46 R, 46 S (1sp 0rs 0al 0rh 8sn 32iy 0cs 5ia)
$ bin/browserid-lookup.js -f login.persona.org -v gmail.com
debug: fetching well-known from gmail.com for principal gmail.com
elapsed_time.fetch_well_known.error: 119
debug: fetching well-known from login.persona.org for principal gmail.com
elapsed_time.fetch_well_known.success: 1875
debug: login.persona.org delegates to gmail.login.persona.org
debug: fetching well-known from gmail.login.persona.org for principal gmail.com
elapsed_time.fetch_well_known.success: 3455
$ bin/browserid-lookup.js -f login.persona.org -v gmail.com
debug: fetching well-known from gmail.com for principal gmail.com
elapsed_time.fetch_well_known.error: 41
debug: fetching well-known from login.persona.org for principal gmail.com
elapsed_time.fetch_well_known.success: 971
debug: login.persona.org delegates to gmail.login.persona.org
debug: fetching well-known from gmail.login.persona.org for principal gmail.com
elapsed_time.fetch_well_known.success: 569
@lloyd
lloyd / gist:7559948
Last active December 28, 2015 20:49
assertion verification, basic
✓ test idps should start up
✓ validation of basic assertion signed by IdP should succeed
✓ validation of basic assertion signed by Fallback should succeed (67ms)
✓ test idp should shut down
assertion time verification
✓ test idp should start up
✓ assertions backed by expired certificates should fail to verify
✓ assertions backed by certificates from the future should fail to verify
diff --git a/b2g/components/B2GComponents.manifest b/b2g/components/B2GComponents.manifest
index 50503cf..44f9676 100644
--- a/b2g/components/B2GComponents.manifest
+++ b/b2g/components/B2GComponents.manifest
@@ -72,6 +72,10 @@ component {637b0f77-2429-49a0-915f-abf5d0db8b9a} WebappsUpdateTimer.js
contract @mozilla.org/b2g/webapps-update-timer;1 {637b0f77-2429-49a0-915f-abf5d0db8b9a}
category update-timer WebappsUpdateTimer @mozilla.org/b2g/webapps-update-timer;1,getService,background-update-timer,webapps.update.interval,86400
+# FxAccountsUIGlue.js
+component {51875c14-91d7-4b8c-b65d-3549e101228c} FxAccountsUIGlue.js
$ adb shell time b2g-info
| megabytes |
NAME PID PPID NICE USS PSS RSS VSIZE OOM_ADJ USER
b2g 3036 1 0 50.5 52.8 58.5 156.0 0 root
(Nuwa) 3068 3036 1 4.4 5.5 11.2 51.6 2 root
Homescreen 3205 3068 18 10.1 11.4 19.6 63.7 8 app_3205
Firefox Account 3430 3068 18 4.6 5.4 12.1 56.7 12 app_3430
E-Mail 3602 3068 18 12.7 13.8 21.0 76.3 12 app_3602
Clock 3638 3068 18 9.2 10.2 17.4 69.1 12 app_3638
Mochitest 3664 3068 18 6.0 6.8 13.4 65.9 11 app_3664
#include <stdio.h>
#include <regex.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
char * stringarr[] = {
"817 (Calendar) S 246 112 0 0 -1 4194624 6534 0 83 0 139 8 0 0 38 18 11 0 22117 61526016 5437 4294967295 32768 34809 3204114848 3204111656 1074820320 0 0 69634 1073777896 4294967295 0 0 17 0 0 0 0 0 0",
"246 ((Nuwa)) S 112 112 0 0 -1 4194560 8245 0 33 0 108 18 0 0 21 1 13 0 1080 54116352 3415 4294967295 32768 34809 3204114848 3204111296 1074820320 0 0 69634 36072 4294967295 0 0 17 0 0 0 0 0 0",
root@android:/ # b2g-info
| megabytes |
NAME PID NICE USS PSS RSS VSIZE OOM_ADJ USER
b2g 1013 0 48.2 49.9 56.4 168.4 0 root
Homescreen 1366 18 15.6 18.0 28.2 72.7 8 app_1366
Firefox Account 1462 18 9.7 11.8 21.5 63.7 11 app_1462
Calendar 1528 18 15.4 18.1 28.7 78.1 10 app_1528
E-Mail 1573 1 20.1 22.8 33.4 78.5 2 app_1573
(Preallocated a 1618 18 11.1 13.3 22.6 63.6 10 root
]$ cat after.txt
Expected to read 4 fields from fscanf(/proc/1682//stat), but got 2.
| megabytes |
NAME PID NICE USS PSS RSS VSIZE OOM_ADJ USER
b2g 1646 0 48.4 50.8 60.3 171.4 0 root
1682 0 10.7 11.9 18.4 51.6 10 root
Homescreen 1806 18 15.6 17.3 25.4 72.7 8 app_1806
E-Mail 2152 18 17.9 20.6 30.8 85.2 11 app_2152
Calendar 2734 18 14.9 18.4 29.3 77.1 10 app_2734
Firefox Account 2823 1 13.8 16.4 25.6 68.5 2 app_2823
1. Deeply want to preserve the possibility of dynamic update. App abstraction helps.
2. Lots of JavaScript will love on this module. Jwcrypto, gherkin, and more. Nice to ensure memory is fully reclaimed.
3. Security isolation - content will cause messages to be passed in. I'd like to give this module minimal permissions for defense in depth.
4. Less likelyhood of crashing system app. I hear Andreas gets a little upset when we do that.
5. Short lifetime - this thing will run infrequently for short periods of time. Why use resources all the time?