Skip to content

Instantly share code, notes, and snippets.

View jbowens's full-sized avatar

Jackson Owens jbowens

  • Brooklyn, NY
View GitHub Profile
#include<stdio.h>
#include<fcntl.h>
int main() {
int ret = open("/home/jbowens/lol.txt/", O_WRONLY | O_CREAT);
}
@jbowens
jbowens / Lock.java
Created April 7, 2013 02:17
A TTAS lock implementation
/**
* A simple lock interface.
*/
public interface Lock {
/**
* Acquires the lock.
*/
void lock();
@jbowens
jbowens / ListCodeDefinition.php
Last active April 9, 2021 09:06
A [list] BBCode definition for jBBCode using [*] for list items.
<?php
require_once "jBBCode" . DIRECTORY_SEPARATOR . "Parser.php";
/**
* Implements a [list] code definition that provides the following syntax:
*
* [list]
* [*] first item
* [*] second item
@jbowens
jbowens / ImageWithClass.php
Created January 7, 2014 21:47
A jBBCode Code Definition for an image bbcode that supports an option class name argument.
<?php
require_once "jBBCode" . DIRECTORY_SEPARATOR . "Parser.php";
/**
* Implements an [img=alt] tag that supports an optional class argument.
*
*/
class ImageWithClass extends \JBBCode\CodeDefinition
{
package main
import (
"fmt"
"net/http"
"strings"
)
const testUrl = "http://respondto.it/jackson-proxy-test"
const testPayload = "hello world"
package main
import (
"fmt"
"time"
)
func main() {
timer := time.NewTicker(time.Second)
package main
import (
"crypto/tls"
"crypto/x509"
"net/http"
)
const tlsCrt = `-----BEGIN CERTIFICATE-----
MIIBgzCCASmgAwIBAgIQL7MpDWvb8tnkLd7ydYboUjAKBggqhkjOPQQDAjAqMRQw
package main
import (
"bytes"
"fmt"
)
func main() {
functionWithBuffer()
}

Ideally, we could evaluate heuristics on:

  • Write amplification
    • We have existing data in Metrics.
  • Space amplification
    • At the end of a test, we could manually Compact(_, _) the entire key space and measure the change in sum of alls stables.
    • Measuring the size of the database's active files at consistent points in the same workload can give us a relative measure of space amplification (eg, this heuristic amplified by x additional bytes), but not an amplification factor.
  • Read amplification
    • Point read amplification
  • How many files are in L0?
This file has been truncated, but you can view the full file.
I200811 17:43:43.303337 1 util/log/sync_buffer.go:195 [config] file created at: 2020/08/11 17:43:43
I200811 17:43:43.303342 1 util/log/sync_buffer.go:195 [config] running on machine: ip-10-12-17-204
I200811 17:43:43.303345 1 util/log/sync_buffer.go:195 [config] binary: CockroachDB CCL v20.2.0-alpha.1-2003-g0ae791a39a-dirty (x86_64-unknown-linux-gnu, built 2020/08/11 17:03:57, go1.13.14)
I200811 17:43:43.303347 1 util/log/sync_buffer.go:195 [config] arguments: [./cockroach start --insecure --store=path=/mnt/data1/cockroach --log-dir=/home/ubuntu/logs --cache=25% --max-sql-memory=25% --port=26257 --http-port=26258 --locality=cloud=aws,region=us-east-2,zone=us-east-2b --join=18.188.135.187:26257 --advertise-host=10.12.17.204]
I200811 17:43:43.303353 1 util/log/sync_buffer.go:195 [config] line format: [IWEF]yymmdd hh:mm:ss.uuuuuu goid file:line msg utf8=✓
W200811 17:43:43.303260 1 cli/start.go:1314 RUNNING IN INSECURE MODE!
- Your cluster is open for any client that can access <all your IP addresses>.
- An