Skip to content

Instantly share code, notes, and snippets.

View mniewrzal's full-sized avatar

Michał Niewrzał mniewrzal

View GitHub Profile
{
"Satellite": {
"major": 1,
"minor": 10,
"patch": 0
},
"Storagenode": {
"major": 1,
"minor": 24,
"patch": 0
// Copyright (C) 2023 Storj Labs, Inc.
// See LICENSE for copying information.
package main
import (
"context"
"fmt"
"os"
"sync"
package com.breakcoder.jogun.trader;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.breakcoder.jogun.client.market.base.MarketClientException;
import com.breakcoder.jogun.client.market.poloniex.PoloniexClient;
func TestAbc(t *testing.T) {
filter := gcbf.NewOptimalMaxSize(800000, 0.1, 2*memory.MiB)
for i := 0; i < 800000; i++ {
filter.Add(testrand.PieceID())
}
buffer := bytes.NewBuffer([]byte{})
writer := zip.NewWriter(buffer)
entryWriter, err := writer.Create("test")
require.NoError(t, err)
{
"processes": {
"storagenode": {
"minimum": {
"version": "v0.3.3",
"url": "https://github.com/storj/storj/releases/download/v0.3.4/storagenode_{os}_{arch}.exe.zip"
},
"suggested": {
"version": "0.19.5",
"url": "https://storj-v3-alpha-builds.storage.googleapis.com/bd6d26a-v0.19.5-go1.12.9/storagenode_{os}_{arch}.zip"
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package main
import (
"bytes"
"context"
"fmt"
"io/ioutil"
#!/bin/bash
# set go modules to default behavior
export GO111MODULE=auto
# go knows where our gopath is
export GOPATH=~/storj
# gospace knows where our gopath is (this is to avoid accidental damage to existing GOPATH)
# you should not use default GOPATH here
func BenchmarkEncoding(b *testing.B) {
segments := [][]byte{
[]byte{'a', 'b', 'c', 'd', '1', '2', '3', '4', '5'},
[]byte{'a', '/', 'a', '2', 'a', 'a', 0, '1', 'b', 255},
[]byte{'/', '/', 'a', 0, 'a', 'a', 0, '1', 'b', 'g', 'a', 'b', '/'},
[]byte{0, '/', 'a', '0', 'a', 'a', 0, '1', 'b', 'g', 'a', 'b', 0},
[]byte{'a', '/', 'a', '2', 'a', 'a', 0, '1', 'b', 255, 'a', '/', 'a', '2', 'a', '/', 0, '1', 'b', 255},
}
b.Run("ReplaceAll", func(b *testing.B) {
func BenchmarkValidation(b *testing.B) {
buckets := [][]byte{
[]byte("five5"),
[]byte("abcd-abcd-abcd-abcd-abcd-abcd"),
[]byte("abcd-abcd-abcd-abcd-abcd-abcd-abcd-abcd-abcd-abcd-abcd-abcd"),
}
for _, bucket := range buckets {
b.Run("simple-size-"+strconv.Itoa(len(bucket)), func(b *testing.B) {
for n := 0; n < b.N; n++ {
labels := bytes.Split(bucket, []byte("."))

Keybase proof

I hereby claim:

  • I am mniewrzal on github.

  • I am mniewrzal (https://keybase.io/mniewrzal) on keybase.

  • I have a public key ASCnHL9GI_wZRzT9hbulPZgD_TgoA3pek_vBKEJAZCZYYQo