Skip to content

Commit 307f5e4

Browse files
committed
Release 1.2.0
Signed-off-by: Michał Chojnacki <[email protected]>
1 parent e5d36f0 commit 307f5e4

File tree

5 files changed

+10
-19
lines changed

5 files changed

+10
-19
lines changed

cmd/sno/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/muyo/sno/cmd/sno
22

33
go 1.14
44

5-
require github.com/muyo/sno v1.1.0
5+
require github.com/muyo/sno v1.2.0
66
require github.com/muyo/rush v0.0.0-20200227160314-2d77be2a525b
77

88
replace github.com/muyo/sno => ../../

generator.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ retry:
120120
)
121121

122122
// Fastest branch if we're still within the most recent time unit.
123-
if wallHi == wallNow {
123+
if wallNow == wallHi {
124124
seq := atomic.AddUint32(&g.seq, 1)
125125

126126
if g.seqMax >= seq {
@@ -199,7 +199,7 @@ retry:
199199

200200
g.regression.Unlock()
201201

202-
return id
202+
return
203203
}
204204

205205
// Branch for all routines that are in an "unsafe" past (e.g. multiple time regressions happened

generator_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ func TestGenerator_NewOverflows(t *testing.T) {
154154

155155
// TODO(alcore) The non-blocking writes are far from reliable. The notifications need a rework with
156156
// deep profiling.
157-
if atomic.LoadInt64(notesHi) < int64(seqOverflows)/2 {
158-
t.Errorf("expected at least [%d] overflow notification, got [%d]", seqOverflows/2, atomic.LoadInt64(notesHi))
157+
if atomic.LoadInt64(notesHi) < int64(seqOverflows)/4 {
158+
t.Errorf("expected at least [%d] overflow notification, got [%d]", seqOverflows/4, atomic.LoadInt64(notesHi))
159159
}
160160

161161
timeDist := make(map[int64]int)

internal/cpu_amd64.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// func cpuidReal(op uint32) (eax, ebx, ecx, edx uint32)
55
TEXT ·cpuidReal(SB), NOSPLIT, $0-24
6-
MOVL op+0(FP), AX
6+
MOVL op+0(FP), AX
77
XORQ CX, CX
88
CPUID
99
MOVL AX, eax+8(FP)

internal/encoding_test.go

+4-13
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,12 @@ func testEncoding(t *testing.T) {
1111
}
1212

1313
var encdec = [...]struct {
14-
enc [10]byte
1514
dec string
15+
enc [10]byte
1616
}{
17-
{
18-
[10]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
19-
"2222222222222222",
20-
},
21-
{
22-
[10]byte{78, 111, 33, 96, 160, 255, 154, 10, 16, 51},
23-
"brpk4q72xwf2m63l",
24-
},
25-
{
26-
[10]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255},
27-
"xxxxxxxxxxxxxxxx",
28-
},
17+
{"2222222222222222", [10]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
18+
{"brpk4q72xwf2m63l", [10]byte{78, 111, 33, 96, 160, 255, 154, 10, 16, 51}},
19+
{"xxxxxxxxxxxxxxxx", [10]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255}},
2920
}
3021

3122
func testEncodingEncode(t *testing.T) {

0 commit comments

Comments
 (0)