Skip to content

Instantly share code, notes, and snippets.

$ git checkout master
$ go test -run=none -bench=.*RESPUnmarshal.* -cpuprofile cpu.out
PASS
BenchmarkRESPUnmarshalString 2000000 886 ns/op
BenchmarkRESPUnmarshalBytes 2000000 852 ns/op
BenchmarkRESPUnmarshalInteger 5000000 722 ns/op
BenchmarkRESPUnmarshalArrayString 500000 3913 ns/op
BenchmarkRESPUnmarshalArrayBytes 1000000 2792 ns/op
BenchmarkRESPUnmarshalArrayInteger 500000 5232 ns/op
$ git checkout rewrite-reader
$ go test -run=none -bench=.*RESPUnmarshal.* -cpuprofile cpu.out
PASS
BenchmarkRESPUnmarshalString 1000000 3009 ns/op
BenchmarkRESPUnmarshalBytes 1000000 2930 ns/op
BenchmarkRESPUnmarshalInteger 1000000 2882 ns/op
BenchmarkRESPUnmarshalArrayString 500000 6875 ns/op
BenchmarkRESPUnmarshalArrayBytes 500000 5520 ns/op
BenchmarkRESPUnmarshalArrayInteger 200000 8808 ns/op
SELECT
STRFTIME_UTC_USEC(day, '%Y-%m-%d') AS day,
num_clients
FROM (
SELECT
UTC_USEC_TO_DAY(web100_log_entry.log_time * 1000000) AS day,
COUNT(DISTINCT web100_log_entry.connection_spec.remote_ip) AS num_clients
FROM
plx.google:m_lab.ndt.all
GROUP BY
day num_tests
2016-03-06 28
2016-03-05 53709
2016-03-04 51176
2016-03-03 52181
2016-03-02 48386
2016-03-01 56638
2016-02-29 54926
2016-02-28 50291
2016-02-27 52056
SELECT
COUNT(*) AS test_count
FROM
plx.google:m_lab.ndt.all
WHERE
connection_spec.data_direction = 1
AND (web100_log_entry.snap.SndLimTimeRwin +
web100_log_entry.snap.SndLimTimeCwnd +
web100_log_entry.snap.SndLimTimeSnd) > POW(10, 6)
AND web100_log_entry.log_time >= PARSE_UTC_USEC('2016-03-01 00:00:00') / POW(10, 6)
$ $GOPATH/bin/siad
Loading...
(1/7) Loading gateway...
(2/7) Loading consensus...
(3/7) Loading transaction pool...
(4/7) Loading wallet...
(5/7) Loading miner...
(6/7) Loading host...
(7/7) Loading renter...
Finished loading in 0.24124626300000002 seconds
@mtlynch
mtlynch / Dockerfile
Last active November 7, 2019 20:29
Dockerfile to create a Sia container
FROM debian:jessie-slim
ENV SIA_VERSION 1.3.0
ENV SIA_PACKAGE Sia-v$SIA_VERSION-linux-amd64
ENV SIA_ZIP ${SIA_PACKAGE}.zip
# Choose a binary release of Sia.
ENV SIA_RELEASE https://github.com/NebulousLabs/Sia/releases/download/v$SIA_VERSION/$SIA_ZIP
# Choose the directory within the container where Docker will place Sia.
ENV SIA_DIR /opt/$SIA_PACKAGE
2016/08/07 23:10:30.543188 storageobligations.go:383: Failed to add storage obligation, transaction set was not accepted: consensus conflict: transaction spends a nonexisting siacoin output
2016/08/07 23:10:30.593817 storageobligations.go:396: Error with transaction set, redacting obligation, id 3d7ab5343b8b67483a26bd954e165e5e2c0fee5f62bb69352b75c0a63c7b06fc
2016/08/07 23:10:30.594042 storageobligations.go:531: Rejecting storage obligation expiring at block 127548, current height is 121503. Potential revenue is 312650144005677978470055936.
2016/08/07 23:10:45.746524 storageobligations.go:383: Failed to add storage obligation, transaction set was not accepted: consensus conflict: transaction spends a nonexisting siacoin output
2016/08/07 23:10:45.750307 storageobligations.go:396: Error with transaction set, redacting obligation, id 3d7ab5343b8b67483a26bd954e165e5e2c0fee5f62bb69352b75c0a63c7b06fc
2016/08/07 23:10:45.750436 storageobligations.go:531: Rejecting storage obligation expiring at block 127548, curren
@mtlynch
mtlynch / LICENSE
Last active January 30, 2017 15:28
Install and run Sia-UI 1.1.0 via PowerShell and download a test file
Copyright 2016 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
{
"contracts": [
{
"StorageSpending": "132243374928694384304107",
"downloadspending": "0",
"endheight": 154574,
"fees": "3199647679999999843750000",
"hostpublickey": {
"algorithm": "ed25519",
"key": "Rnm+Rh/GYKL+qsi0tKoRf5s4LS8BufHSXgd+oBxpK5I="