-
Update to git 2.16
-
Setup file monitoring with hgwatchman
- Run
$ brew install watchman $ cd /path/to/mozilla-central
$ watchman watch-project .
#![feature(test)] | |
#![recursion_limit = "1024"] | |
#![allow(dead_code)] | |
#![feature(stdsimd)] | |
extern crate test; | |
extern crate rand; | |
// Defines a little benchmarking DSL macro. If you've been linked here, it's safe to ignore. | |
#[macro_use] |
// Coord is a way of storing a 2d integer vector (e.g. vec2i or similar) as a | |
// value type by packing it into a number. It will do what you want in a Map or | |
// Set, you can compare them for equality, and it should be free of alloctions | |
// (at least in Spidermonkey and V8, but probably anywhere else too). | |
// | |
// The downside is that it's a pain to debug, use, and it has ugly syntax. It's | |
// type safe (in typescript) tho. | |
// | |
// Each component is stored as a 15 bit (signed, 2's complement) integer. These |
ChromeUtils.import("resource://gre/modules/SyncedBookmarksMirror.jsm"); | |
async function addBookmarks() { | |
let buf = await SyncedBookmarksMirror.open({ | |
path: ":memory:", | |
recordTelemetryEvent() {}, | |
}); | |
let menu = { | |
id: "menu", |
Processing blobs: 2528058 | |
Processing trees: 7712410 | |
Processing commits: 920603 | |
Matching commits to trees: 920603 | |
Processing annotated tags: 0 | |
Processing references: 165 | |
| Name | Value | Level of concern | | |
| ---------------------------- | --------- | ------------------------------ | | |
| Overall repository size | | | | |
| * Commits | | | |
#include <string> | |
#include <vector> | |
#include <cstddef> | |
#include <memory> | |
#include <iostream> | |
#include <cassert> | |
#include <stdexcept> | |
struct XmlNode { | |
struct Attribute { |
// Run me from a scratchpad. | |
(function() { | |
ChromeUtils.import("resource://gre/modules/SyncedBookmarksMirror.jsm"); | |
ChromeUtils.import("resource://services-sync/util.js"); | |
const RECORDS_TO_INSERT = 10000; | |
function randUpTo(n) { | |
return Math.floor(Math.random() * n); | |
} |
(function() { | |
Cu.import("resource://gre/modules/PlacesUtils.jsm"); | |
Cu.import("resource://gre/modules/PlacesSyncUtils.jsm"); | |
Cu.import("resource://services-common/async.js"); | |
Cu.import("resource://gre/modules/Log.jsm"); | |
Cu.import("resource://services-sync/engines.js"); | |
Cu.import("resource://services-sync/engines/bookmarks.js"); | |
Cu.import("resource://services-sync/service.js"); | |
Cu.import("resource://services-sync/util.js"); |
var oldCall = Function.prototype.call; | |
var profileTable = Object.create(null); | |
Function.prototype.call = function call() { | |
if (this === oldCall || this === call || this === Function.prototype.apply || this === performance.now) { | |
return oldCall.apply(this, arguments); | |
} | |
var profEntry = profileTable[this.name]; | |
if (!profEntry) { | |
profEntry = { calls: 0, time: 0 }; | |
profileTable[this.name] = profEntry; |
// This is free and unencumbered software released into the public domain. | |
// For more information, please refer to <http://unlicense.org/> | |
import 'dart:math' as math; | |
/// A class used to store the state of a [ResumableRandom]. | |
class RngState { | |
final int originalSeed, a, b, c, d; | |
RngState(this.originalSeed, this.a, this.b, this.c, this.d); | |
} |