This file contains hidden or 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
package internal | |
import ( | |
"sync" | |
"testing" | |
"time" | |
) | |
//goos: darwin | |
//goarch: amd64 |
This file contains hidden or 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
// goos: darwin | |
// goarch: arm64 | |
// pkg: github.com/hashicorp/raft | |
// BenchmarkTimeAfter-10 436 3896361 ns/op 2152307 B/op 30001 allocs/op | |
// BenchmarkTimer-10 764 1399790 ns/op 2000058 B/op 30001 allocs/op | |
// BenchmarkWithoutDefer-10 3362208 356.1 ns/op 0 B/op 0 allocs/op | |
// BenchmarkWithDefer1-10 406236 2952 ns/op 0 B/op 0 allocs/op | |
// BenchmarkWithDefer2-10 404098 2956 ns/op 0 B/op 0 allocs/op | |
const timerBenchAttempt = 10000 |
This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"sync" | |
"sync/atomic" | |
"testing" | |
) | |
func BenchmarkAtomicValue(b *testing.B) { |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net/http" | |
"sync" | |
"sync/atomic" | |
"time" |
This file contains hidden or 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
package daemon | |
import ( | |
"context" | |
"fmt" | |
"math" | |
"os" | |
"strconv" | |
"sync" | |
"time" |
This file contains hidden or 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
package main | |
import ( | |
"encoding/binary" | |
"fmt" | |
"time" | |
"github.com/dgraph-io/badger" | |
) |
This file contains hidden or 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 solveSudoku(board [][]byte) { | |
convertBoard(board) | |
// solve sudoku | |
rows := make([][]bool, 9) | |
for i := range rows { | |
rows[i] = make([]bool, 10) | |
} | |
cols := make([][]bool, 9) |
This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"io" | |
"github.com/pierrec/lz4" | |
) | |
var payload = []byte{ |
This file contains hidden or 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 2019 LINE Corporation | |
// | |
// LINE Corporation licenses this file to you 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, WITHOUT |
This file contains hidden or 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 2019 LINE Corporation | |
// | |
// LINE Corporation licenses this file to you 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, WITHOUT |
NewerOlder