This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(".")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (C) 2019 Storj Labs, Inc. | |
// See LICENSE for copying information. | |
package main | |
import ( | |
"bytes" | |
"context" | |
"fmt" | |
"io/ioutil" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (C) 2023 Storj Labs, Inc. | |
// See LICENSE for copying information. | |
package main | |
import ( | |
"context" | |
"fmt" | |
"os" | |
"sync" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Satellite": { | |
"major": 1, | |
"minor": 10, | |
"patch": 0 | |
}, | |
"Storagenode": { | |
"major": 1, | |
"minor": 24, | |
"patch": 0 |
OlderNewer