-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update FindProjectInfoBySecretKey test
- Loading branch information
1 parent
3621e5d
commit f637f44
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,13 +80,16 @@ func RunFindProjectInfoBySecretKeyTest( | |
t.Run("FindProjectInfoBySecretKey test", func(t *testing.T) { | ||
ctx := context.Background() | ||
|
||
info1, err := db.FindProjectInfoByID(ctx, database.DefaultProjectID) | ||
username := "[email protected]" | ||
password := "hashed-password" | ||
|
||
_, project, err := db.EnsureDefaultUserAndProject(ctx, username, password, clientDeactivateThreshold) | ||
assert.NoError(t, err) | ||
|
||
info2, err := db.FindProjectInfoBySecretKey(ctx, info1.SecretKey) | ||
info2, err := db.FindProjectInfoBySecretKey(ctx, project.SecretKey) | ||
assert.NoError(t, err) | ||
|
||
assert.Equal(t, info1.ID, info2.ID) | ||
assert.Equal(t, project.ID, info2.ID) | ||
}) | ||
} | ||
|
||
|
f637f44
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go Benchmark
BenchmarkDocument/constructor_test - ns/op
1324
ns/op1348
ns/op0.98
BenchmarkDocument/constructor_test - B/op
1208
B/op1208
B/op1
BenchmarkDocument/constructor_test - allocs/op
20
allocs/op20
allocs/op1
BenchmarkDocument/status_test - ns/op
776.9
ns/op774.9
ns/op1.00
BenchmarkDocument/status_test - B/op
1176
B/op1176
B/op1
BenchmarkDocument/status_test - allocs/op
18
allocs/op18
allocs/op1
BenchmarkDocument/equals_test - ns/op
8157
ns/op7095
ns/op1.15
BenchmarkDocument/equals_test - B/op
6913
B/op6913
B/op1
BenchmarkDocument/equals_test - allocs/op
120
allocs/op120
allocs/op1
BenchmarkDocument/nested_update_test - ns/op
16185
ns/op18023
ns/op0.90
BenchmarkDocument/nested_update_test - B/op
11963
B/op11963
B/op1
BenchmarkDocument/nested_update_test - allocs/op
254
allocs/op254
allocs/op1
BenchmarkDocument/delete_test - ns/op
22023
ns/op21860
ns/op1.01
BenchmarkDocument/delete_test - B/op
15187
B/op15188
B/op1.00
BenchmarkDocument/delete_test - allocs/op
333
allocs/op333
allocs/op1
BenchmarkDocument/object_test - ns/op
8392
ns/op8299
ns/op1.01
BenchmarkDocument/object_test - B/op
6721
B/op6721
B/op1
BenchmarkDocument/object_test - allocs/op
116
allocs/op116
allocs/op1
BenchmarkDocument/array_test - ns/op
28720
ns/op28416
ns/op1.01
BenchmarkDocument/array_test - B/op
11819
B/op11819
B/op1
BenchmarkDocument/array_test - allocs/op
270
allocs/op270
allocs/op1
BenchmarkDocument/text_test - ns/op
30622
ns/op30734
ns/op1.00
BenchmarkDocument/text_test - B/op
14884
B/op14795
B/op1.01
BenchmarkDocument/text_test - allocs/op
468
allocs/op468
allocs/op1
BenchmarkDocument/text_composition_test - ns/op
28789
ns/op28436
ns/op1.01
BenchmarkDocument/text_composition_test - B/op
18398
B/op18278
B/op1.01
BenchmarkDocument/text_composition_test - allocs/op
477
allocs/op477
allocs/op1
BenchmarkDocument/rich_text_test - ns/op
79441
ns/op79377
ns/op1.00
BenchmarkDocument/rich_text_test - B/op
38644
B/op38540
B/op1.00
BenchmarkDocument/rich_text_test - allocs/op
1147
allocs/op1147
allocs/op1
BenchmarkDocument/counter_test - ns/op
16581
ns/op16429
ns/op1.01
BenchmarkDocument/counter_test - B/op
10210
B/op10210
B/op1
BenchmarkDocument/counter_test - allocs/op
236
allocs/op236
allocs/op1
BenchmarkDocument/text_edit_gc_100 - ns/op
2904497
ns/op2870698
ns/op1.01
BenchmarkDocument/text_edit_gc_100 - B/op
1658706
B/op1655216
B/op1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op
17094
allocs/op17091
allocs/op1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op
230989704
ns/op227911236
ns/op1.01
BenchmarkDocument/text_edit_gc_1000 - B/op
144381852
B/op144348859
B/op1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op
200939
allocs/op200920
allocs/op1.00
BenchmarkDocument/text_split_gc_100 - ns/op
3374418
ns/op3341420
ns/op1.01
BenchmarkDocument/text_split_gc_100 - B/op
2316837
B/op2313404
B/op1.00
BenchmarkDocument/text_split_gc_100 - allocs/op
16194
allocs/op16193
allocs/op1.00
BenchmarkDocument/text_split_gc_1000 - ns/op
287213246
ns/op284979132
ns/op1.01
BenchmarkDocument/text_split_gc_1000 - B/op
228946088
B/op228892912
B/op1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op
204050
allocs/op203950
allocs/op1.00
BenchmarkDocument/text_delete_all_10000 - ns/op
11248896
ns/op10649517
ns/op1.06
BenchmarkDocument/text_delete_all_10000 - B/op
5810382
B/op5809883
B/op1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op
40674
allocs/op40671
allocs/op1.00
BenchmarkDocument/text_delete_all_100000 - ns/op
187540500
ns/op186393795
ns/op1.01
BenchmarkDocument/text_delete_all_100000 - B/op
81899429
B/op81904469
B/op1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op
411620
allocs/op411644
allocs/op1.00
BenchmarkDocument/text_100 - ns/op
222977
ns/op216510
ns/op1.03
BenchmarkDocument/text_100 - B/op
120105
B/op118483
B/op1.01
BenchmarkDocument/text_100 - allocs/op
5080
allocs/op5080
allocs/op1
BenchmarkDocument/text_1000 - ns/op
2435371
ns/op2354446
ns/op1.03
BenchmarkDocument/text_1000 - B/op
1169094
B/op1153053
B/op1.01
BenchmarkDocument/text_1000 - allocs/op
50084
allocs/op50084
allocs/op1
BenchmarkDocument/array_1000 - ns/op
1217112
ns/op1167715
ns/op1.04
BenchmarkDocument/array_1000 - B/op
1091332
B/op1091275
B/op1.00
BenchmarkDocument/array_1000 - allocs/op
11826
allocs/op11825
allocs/op1.00
BenchmarkDocument/array_10000 - ns/op
12935459
ns/op12925120
ns/op1.00
BenchmarkDocument/array_10000 - B/op
9799391
B/op9799997
B/op1.00
BenchmarkDocument/array_10000 - allocs/op
120288
allocs/op120290
allocs/op1.00
BenchmarkDocument/array_gc_100 - ns/op
151477
ns/op143218
ns/op1.06
BenchmarkDocument/array_gc_100 - B/op
132486
B/op132500
B/op1.00
BenchmarkDocument/array_gc_100 - allocs/op
1248
allocs/op1249
allocs/op1.00
BenchmarkDocument/array_gc_1000 - ns/op
1404241
ns/op1362603
ns/op1.03
BenchmarkDocument/array_gc_1000 - B/op
1158800
B/op1158952
B/op1.00
BenchmarkDocument/array_gc_1000 - allocs/op
12864
allocs/op12865
allocs/op1.00
BenchmarkDocument/counter_1000 - ns/op
208605
ns/op192998
ns/op1.08
BenchmarkDocument/counter_1000 - B/op
192853
B/op192852
B/op1.00
BenchmarkDocument/counter_1000 - allocs/op
5765
allocs/op5765
allocs/op1
BenchmarkDocument/counter_10000 - ns/op
2180998
ns/op2121356
ns/op1.03
BenchmarkDocument/counter_10000 - B/op
2087768
B/op2087765
B/op1.00
BenchmarkDocument/counter_10000 - allocs/op
59772
allocs/op59772
allocs/op1
BenchmarkDocument/object_1000 - ns/op
1372586
ns/op1323428
ns/op1.04
BenchmarkDocument/object_1000 - B/op
1427837
B/op1427932
B/op1.00
BenchmarkDocument/object_1000 - allocs/op
9844
allocs/op9844
allocs/op1
BenchmarkDocument/object_10000 - ns/op
14722210
ns/op14952592
ns/op0.98
BenchmarkDocument/object_10000 - B/op
12168024
B/op12166471
B/op1.00
BenchmarkDocument/object_10000 - allocs/op
100564
allocs/op100558
allocs/op1.00
BenchmarkDocument/tree_100 - ns/op
1060730
ns/op998783
ns/op1.06
BenchmarkDocument/tree_100 - B/op
943677
B/op943673
B/op1.00
BenchmarkDocument/tree_100 - allocs/op
6099
allocs/op6099
allocs/op1
BenchmarkDocument/tree_1000 - ns/op
77105922
ns/op74036459
ns/op1.04
BenchmarkDocument/tree_1000 - B/op
86459768
B/op86460238
B/op1.00
BenchmarkDocument/tree_1000 - allocs/op
60113
allocs/op60112
allocs/op1.00
BenchmarkDocument/tree_10000 - ns/op
9563661790
ns/op9238843028
ns/op1.04
BenchmarkDocument/tree_10000 - B/op
8580992952
B/op8580993112
B/op1.00
BenchmarkDocument/tree_10000 - allocs/op
600252
allocs/op600251
allocs/op1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op
76461998
ns/op71588951
ns/op1.07
BenchmarkDocument/tree_delete_all_1000 - B/op
86990845
B/op86990417
B/op1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op
67751
allocs/op67750
allocs/op1.00
BenchmarkDocument/tree_edit_gc_100 - ns/op
3763872
ns/op3588143
ns/op1.05
BenchmarkDocument/tree_edit_gc_100 - B/op
4121005
B/op4120927
B/op1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op
14356
allocs/op14355
allocs/op1.00
BenchmarkDocument/tree_edit_gc_1000 - ns/op
311693286
ns/op292095970
ns/op1.07
BenchmarkDocument/tree_edit_gc_1000 - B/op
383465548
B/op383466214
B/op1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op
145406
allocs/op145408
allocs/op1.00
BenchmarkDocument/tree_split_gc_100 - ns/op
2532606
ns/op2419488
ns/op1.05
BenchmarkDocument/tree_split_gc_100 - B/op
2386865
B/op2386838
B/op1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op
10341
allocs/op10341
allocs/op1
BenchmarkDocument/tree_split_gc_1000 - ns/op
188908079
ns/op175905530
ns/op1.07
BenchmarkDocument/tree_split_gc_1000 - B/op
221992006
B/op221990052
B/op1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op
112261
allocs/op112245
allocs/op1.00
BenchmarkRPC/client_to_server - ns/op
355195892
ns/op345650310
ns/op1.03
BenchmarkRPC/client_to_server - B/op
17508397
B/op16395133
B/op1.07
BenchmarkRPC/client_to_server - allocs/op
166873
allocs/op166812
allocs/op1.00
BenchmarkRPC/client_to_client_via_server - ns/op
604340796
ns/op599230474
ns/op1.01
BenchmarkRPC/client_to_client_via_server - B/op
35011136
B/op31200524
B/op1.12
BenchmarkRPC/client_to_client_via_server - allocs/op
312074
allocs/op312356
allocs/op1.00
BenchmarkRPC/attach_large_document - ns/op
1372092119
ns/op1320790007
ns/op1.04
BenchmarkRPC/attach_large_document - B/op
1890027928
B/op1889214992
B/op1.00
BenchmarkRPC/attach_large_document - allocs/op
7570
allocs/op7549
allocs/op1.00
BenchmarkRPC/adminCli_to_server - ns/op
534424826
ns/op524792658
ns/op1.02
BenchmarkRPC/adminCli_to_server - B/op
36782728
B/op35979672
B/op1.02
BenchmarkRPC/adminCli_to_server - allocs/op
289667
allocs/op289662
allocs/op1.00
BenchmarkLocker - ns/op
66.86
ns/op64.08
ns/op1.04
BenchmarkLocker - B/op
16
B/op16
B/op1
BenchmarkLocker - allocs/op
1
allocs/op1
allocs/op1
BenchmarkLockerParallel - ns/op
38.69
ns/op37.88
ns/op1.02
BenchmarkLockerParallel - B/op
0
B/op0
B/opNaN
BenchmarkLockerParallel - allocs/op
0
allocs/op0
allocs/opNaN
BenchmarkLockerMoreKeys - ns/op
144
ns/op138.8
ns/op1.04
BenchmarkLockerMoreKeys - B/op
15
B/op15
B/op1
BenchmarkLockerMoreKeys - allocs/op
0
allocs/op0
allocs/opNaN
BenchmarkChange/Push_10_Changes - ns/op
3787943
ns/op3738509
ns/op1.01
BenchmarkChange/Push_10_Changes - B/op
126247
B/op127083
B/op0.99
BenchmarkChange/Push_10_Changes - allocs/op
1254
allocs/op1254
allocs/op1
BenchmarkChange/Push_100_Changes - ns/op
14064169
ns/op13951923
ns/op1.01
BenchmarkChange/Push_100_Changes - B/op
655979
B/op646730
B/op1.01
BenchmarkChange/Push_100_Changes - allocs/op
6539
allocs/op6540
allocs/op1.00
BenchmarkChange/Push_1000_Changes - ns/op
113208392
ns/op111633212
ns/op1.01
BenchmarkChange/Push_1000_Changes - B/op
6085603
B/op6052291
B/op1.01
BenchmarkChange/Push_1000_Changes - allocs/op
62159
allocs/op62156
allocs/op1.00
BenchmarkChange/Pull_10_Changes - ns/op
2860189
ns/op2807725
ns/op1.02
BenchmarkChange/Pull_10_Changes - B/op
100709
B/op101299
B/op0.99
BenchmarkChange/Pull_10_Changes - allocs/op
952
allocs/op951
allocs/op1.00
BenchmarkChange/Pull_100_Changes - ns/op
4306482
ns/op4259998
ns/op1.01
BenchmarkChange/Pull_100_Changes - B/op
258017
B/op259044
B/op1.00
BenchmarkChange/Pull_100_Changes - allocs/op
3154
allocs/op3154
allocs/op1
BenchmarkChange/Pull_1000_Changes - ns/op
8358381
ns/op8186496
ns/op1.02
BenchmarkChange/Pull_1000_Changes - B/op
1393690
B/op1399630
B/op1.00
BenchmarkChange/Pull_1000_Changes - allocs/op
26870
allocs/op26877
allocs/op1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op
16888275
ns/op16788712
ns/op1.01
BenchmarkSnapshot/Push_3KB_snapshot - B/op
796774
B/op814611
B/op0.98
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op
6541
allocs/op6542
allocs/op1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op
120606426
ns/op116153491
ns/op1.04
BenchmarkSnapshot/Push_30KB_snapshot - B/op
6260720
B/op6295727
B/op0.99
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op
62158
allocs/op62346
allocs/op1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op
6606507
ns/op6588486
ns/op1.00
BenchmarkSnapshot/Pull_3KB_snapshot - B/op
904743
B/op908101
B/op1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op
14877
allocs/op14882
allocs/op1.00
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op
15225701
ns/op14361476
ns/op1.06
BenchmarkSnapshot/Pull_30KB_snapshot - B/op
6981760
B/op6995643
B/op1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op
144137
allocs/op144141
allocs/op1.00
BenchmarkSync/memory_sync_10_test - ns/op
6968
ns/op6687
ns/op1.04
BenchmarkSync/memory_sync_10_test - B/op
1286
B/op1286
B/op1
BenchmarkSync/memory_sync_10_test - allocs/op
38
allocs/op38
allocs/op1
BenchmarkSync/memory_sync_100_test - ns/op
52095
ns/op52081
ns/op1.00
BenchmarkSync/memory_sync_100_test - B/op
8645
B/op8642
B/op1.00
BenchmarkSync/memory_sync_100_test - allocs/op
273
allocs/op273
allocs/op1
BenchmarkSync/memory_sync_1000_test - ns/op
592853
ns/op587862
ns/op1.01
BenchmarkSync/memory_sync_1000_test - B/op
74479
B/op74357
B/op1.00
BenchmarkSync/memory_sync_1000_test - allocs/op
2118
allocs/op2110
allocs/op1.00
BenchmarkSync/memory_sync_10000_test - ns/op
7226373
ns/op6961544
ns/op1.04
BenchmarkSync/memory_sync_10000_test - B/op
754724
B/op764082
B/op0.99
BenchmarkSync/memory_sync_10000_test - allocs/op
20534
allocs/op20603
allocs/op1.00
BenchmarkTextEditing - ns/op
19030115012
ns/op18032931695
ns/op1.06
BenchmarkTextEditing - B/op
9041828144
B/op9038055344
B/op1.00
BenchmarkTextEditing - allocs/op
19921844
allocs/op19923783
allocs/op1.00
This comment was automatically generated by workflow using github-action-benchmark.