-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests-go.txt
894 lines (598 loc) · 23.2 KB
/
run-tests-go.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
Running automated test file(s):
Go packages: sublist
===============================================================================
Running: ../../.github/citools/go/go-lint-golangci-lint
Running GoLangCi-Lint
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.025s
user 0m0.021s
sys 0m0.019s
==============================================================================
Running: golangci-lint run --enable-all ./...
level=warning msg="[runner] The linter 'nosnakecase' is deprecated (since v1.48.1) due to: The repository of the linter has been deprecated by the owner. Replaced by revive(var-naming)."
level=warning msg="[runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner. "
level=warning msg="[runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner. Replaced by exportloopref."
level=warning msg="[runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive."
level=warning msg="[runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. Replaced by govet 'fieldalignment'."
level=warning msg="[runner] The linter 'exhaustivestruct' is deprecated (since v1.46.0) due to: The owner seems to have abandoned the linter. Replaced by exhaustruct."
relations.go:3:44: Comment should end in a period (godot)
// Relation is the comparison between lists
^
relations.go:6:22: Comment should end in a period (godot)
// Possible relations
^
sublist.go:20: File is not `gofumpt`-ed (gofumpt)
sublist_test.go:10:25: Using the variable on range scope `tc` in function literal (scopelint)
if actual := Sublist(tc.listOne, tc.listTwo); actual != tc.expected {
^
sublist_test.go:11:49: Using the variable on range scope `tc` in function literal (scopelint)
t.Fatalf("Sublist(%#v,%#v) = %v, want: %v", tc.listOne, tc.listTwo, actual, tc.expected)
^
sublist.go:12:27: unnecessary conversion (unconvert)
str = strings.Trim(string(str), "[]")
^
sublist.go:19: unnecessary leading newline (whitespace)
func Sublist(l1, l2 []int) Relation {
sublist_test.go:21:2: for statements should only be cuddled with assignments used in the iteration (wsl)
for i := 0; i < b.N; i++ {
^
cases_test.go:8:5: testCases is a global variable (gochecknoglobals)
var testCases = []struct {
^
sublist_test.go:7:1: Function TestSublist missing the call to method parallel (paralleltest)
func TestSublist(t *testing.T) {
^
sublist_test.go:8:2: Range statement for test TestSublist missing the call to method parallel in test Run (paralleltest)
for _, tc := range testCases {
^
cases_test.go:1:9: package should be `sublist_test` instead of `sublist` (testpackage)
package sublist
^
sublist_examples_test.go:1:9: package should be `sublist_test` instead of `sublist` (testpackage)
package sublist
^
sublist_test.go:1:9: package should be `sublist_test` instead of `sublist` (testpackage)
package sublist
^
sublist_examples_test.go:9:2: variable name 'l2' is too short for the scope of its usage (varnamelen)
l2 := []int{1, 2, 3}
^
sublist.go:26:2: variable name 's2' is too short for the scope of its usage (varnamelen)
s2 := ListToString(l2)
^
sublist_examples_test.go:8:2: variable name 'l1' is too short for the scope of its usage (varnamelen)
l1 := []int{1, 2, 3}
^
sublist.go:25:2: variable name 's1' is too short for the scope of its usage (varnamelen)
s1 := ListToString(l1)
^
real 0m0.500s
user 0m0.710s
sys 0m0.475s
==============================================================================
Exit code: -1
real 0m0.537s
user 0m0.736s
sys 0m0.505s
real 0m0.540s
user 0m0.738s
sys 0m0.506s
===============================================================================
Running: ../../.github/citools/go/go-lint-revive
Running Go Lint Revive
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.019s
user 0m0.016s
sys 0m0.016s
==============================================================================
Running: revive -formatter=stylish ./...
real 0m0.054s
user 0m0.028s
sys 0m0.042s
==============================================================================
Exit code: 0
real 0m0.082s
user 0m0.049s
sys 0m0.067s
real 0m0.084s
user 0m0.050s
sys 0m0.068s
===============================================================================
Running: ../../.github/citools/go/go-lint-ineffassign
../run-tests: line 41: .github/citools/go/go-lint-ineffassign: No such file or directory
real 0m0.000s
user 0m0.000s
sys 0m0.000s
===============================================================================
Running: ../../.github/citools/go/go-lint-go-consistent
Running Go go-consistent
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.025s
user 0m0.020s
sys 0m0.023s
==============================================================================
Running: go-consistent -v ./...
info: check "./."
internal error: package "fmt" without types was imported from "sublist"
real 0m0.084s
user 0m0.116s
sys 0m0.091s
==============================================================================
Exit code: -1
real 0m0.120s
user 0m0.141s
sys 0m0.125s
real 0m0.121s
user 0m0.143s
sys 0m0.126s
===============================================================================
Running: ../../.github/citools/go/go-lint-staticcheck
Running Go StaticCheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.024s
user 0m0.024s
sys 0m0.025s
==============================================================================
Running: staticcheck -checks=all ./...
real 0m0.185s
user 0m0.218s
sys 0m0.139s
==============================================================================
Exit code: 0
real 0m0.221s
user 0m0.248s
sys 0m0.173s
real 0m0.222s
user 0m0.249s
sys 0m0.173s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocritic
Running Go gocritic
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.022s
user 0m0.015s
sys 0m0.029s
==============================================================================
Running: gocritic check -enableAll ./...
real 0m0.892s
user 0m2.227s
sys 0m0.374s
==============================================================================
Exit code: 0
real 0m0.925s
user 0m2.248s
sys 0m0.411s
real 0m0.927s
user 0m2.250s
sys 0m0.411s
===============================================================================
Running: ../../.github/citools/go/go-lint-go_vet
Running Go Vet
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.025s
user 0m0.018s
sys 0m0.033s
==============================================================================
Running: go vet ./...
real 0m0.083s
user 0m0.112s
sys 0m0.074s
==============================================================================
Exit code: 0
real 0m0.122s
user 0m0.135s
sys 0m0.119s
real 0m0.124s
user 0m0.135s
sys 0m0.120s
===============================================================================
Running: ../../.github/citools/go/go-fixer-go_fix
Running go fix
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.028s
user 0m0.027s
sys 0m0.023s
==============================================================================
Running: go fix ./...
real 0m0.025s
user 0m0.022s
sys 0m0.029s
==============================================================================
Exit code: 0
real 0m0.066s
user 0m0.055s
sys 0m0.065s
real 0m0.069s
user 0m0.056s
sys 0m0.067s
===============================================================================
Running: ../../.github/citools/go/go-lint-errcheck
Running Go errcheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.024s
user 0m0.026s
sys 0m0.021s
==============================================================================
Running: errcheck ./...
real 0m0.429s
user 0m1.292s
sys 0m0.260s
==============================================================================
Exit code: 0
real 0m0.464s
user 0m1.323s
sys 0m0.291s
real 0m0.466s
user 0m1.324s
sys 0m0.291s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocyclo
Running Go gocyclo
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.025s
user 0m0.026s
sys 0m0.025s
==============================================================================
Running: gocyclo .
9 sublist Sublist sublist.go:19:1
4 sublist BenchmarkSublist sublist_test.go:17:1
3 sublist TestSublist sublist_test.go:7:1
1 sublist ExampleSublist sublist_examples_test.go:7:1
1 sublist ListToString sublist.go:10:1
real 0m0.003s
user 0m0.001s
sys 0m0.001s
==============================================================================
Exit code: 0
real 0m0.038s
user 0m0.036s
sys 0m0.031s
real 0m0.040s
user 0m0.036s
sys 0m0.032s
===============================================================================
Running: ../../.github/citools/go/go-lint-misspell
Running Go misspell
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: misspell .
real 0m0.021s
user 0m0.024s
sys 0m0.011s
==============================================================================
Exit code: 0
real 0m0.031s
user 0m0.032s
sys 0m0.016s
real 0m0.033s
user 0m0.033s
sys 0m0.017s
===============================================================================
Running: ../../.github/citools/go/go-lint-gosec
Running Go GoSec
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.034s
user 0m0.029s
sys 0m0.026s
==============================================================================
Running: gosec ./...
[gosec] 2023/09/07 00:31:24 Including rules: default
[gosec] 2023/09/07 00:31:24 Excluding rules: default
[gosec] 2023/09/07 00:31:24 Import directory: /home/vpayno/git_vpayno/exercism-workspace/go/sublist
[gosec] 2023/09/07 00:31:24 Checking package: sublist
[gosec] 2023/09/07 00:31:24 Checking file: /home/vpayno/git_vpayno/exercism-workspace/go/sublist/relations.go
[gosec] 2023/09/07 00:31:24 Checking file: /home/vpayno/git_vpayno/exercism-workspace/go/sublist/sublist.go
Results:
[1;36mSummary:[0m
Gosec : dev
Files : 2
Lines : 53
Nosec : 0
Issues : [1;32m0[0m
real 0m0.119s
user 0m0.130s
sys 0m0.105s
==============================================================================
Exit code: 0
real 0m0.164s
user 0m0.167s
sys 0m0.138s
real 0m0.167s
user 0m0.168s
sys 0m0.139s
===============================================================================
Running: ../../.github/citools/go/go-test-cover-report
Running Go Test, Coverage & Reports
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.030s
user 0m0.026s
sys 0m0.031s
==============================================================================
Running: gotest -v -covermode=count -coverprofile coverage.out ./...
=== RUN TestSublist
=== RUN TestSublist/empty_lists
=== RUN TestSublist/empty_list_within_non_empty_list
=== RUN TestSublist/non_empty_list_contains_empty_list
=== RUN TestSublist/list_equals_itself
=== RUN TestSublist/different_lists
=== RUN TestSublist/false_start
=== RUN TestSublist/consecutive
=== RUN TestSublist/sublist_at_start
=== RUN TestSublist/sublist_in_middle
=== RUN TestSublist/sublist_at_end
=== RUN TestSublist/at_start_of_superlist
=== RUN TestSublist/in_middle_of_superlist
=== RUN TestSublist/at_end_of_superlist
=== RUN TestSublist/first_list_missing_element_from_second_list
=== RUN TestSublist/second_list_missing_element_from_first_list
=== RUN TestSublist/first_list_missing_additional_digits_from_second_list
=== RUN TestSublist/order_matters_to_a_list
=== RUN TestSublist/same_digits_but_different_numbers
--- PASS: TestSublist (0.00s)
--- PASS: TestSublist/empty_lists (0.00s)
--- PASS: TestSublist/empty_list_within_non_empty_list (0.00s)
--- PASS: TestSublist/non_empty_list_contains_empty_list (0.00s)
--- PASS: TestSublist/list_equals_itself (0.00s)
--- PASS: TestSublist/different_lists (0.00s)
--- PASS: TestSublist/false_start (0.00s)
--- PASS: TestSublist/consecutive (0.00s)
--- PASS: TestSublist/sublist_at_start (0.00s)
--- PASS: TestSublist/sublist_in_middle (0.00s)
--- PASS: TestSublist/sublist_at_end (0.00s)
--- PASS: TestSublist/at_start_of_superlist (0.00s)
--- PASS: TestSublist/in_middle_of_superlist (0.00s)
--- PASS: TestSublist/at_end_of_superlist (0.00s)
--- PASS: TestSublist/first_list_missing_element_from_second_list (0.00s)
--- PASS: TestSublist/second_list_missing_element_from_first_list (0.00s)
--- PASS: TestSublist/first_list_missing_additional_digits_from_second_list (0.00s)
--- PASS: TestSublist/order_matters_to_a_list (0.00s)
--- PASS: TestSublist/same_digits_but_different_numbers (0.00s)
=== RUN ExampleSublist
--- PASS: ExampleSublist (0.00s)
PASS
coverage: 100.0% of statements
ok sublist 0.002s coverage: 100.0% of statements
real 0m0.193s
user 0m0.238s
sys 0m0.158s
==============================================================================
Running: go tool cover -func=coverage.out
sublist/sublist.go:10: ListToString 100.0%
sublist/sublist.go:19: Sublist 100.0%
total: (statements) 100.0%
real 0m0.052s
user 0m0.061s
sys 0m0.079s
==============================================================================
Running: go tool cover -html coverage.out -o coverage.html
real 0m0.054s
user 0m0.081s
sys 0m0.071s
==============================================================================
Running: cover_annotate
Running: gocov convert coverage.out | gocov annotate -ceiling=100 - | tee coverage-annotations.txt
real 0m0.018s
user 0m0.016s
sys 0m0.030s
real 0m0.018s
user 0m0.016s
sys 0m0.030s
==============================================================================
Running: gotest -v -race -covermode=atomic ./...
=== RUN TestSublist
=== RUN TestSublist/empty_lists
=== RUN TestSublist/empty_list_within_non_empty_list
=== RUN TestSublist/non_empty_list_contains_empty_list
=== RUN TestSublist/list_equals_itself
=== RUN TestSublist/different_lists
=== RUN TestSublist/false_start
=== RUN TestSublist/consecutive
=== RUN TestSublist/sublist_at_start
=== RUN TestSublist/sublist_in_middle
=== RUN TestSublist/sublist_at_end
=== RUN TestSublist/at_start_of_superlist
=== RUN TestSublist/in_middle_of_superlist
=== RUN TestSublist/at_end_of_superlist
=== RUN TestSublist/first_list_missing_element_from_second_list
=== RUN TestSublist/second_list_missing_element_from_first_list
=== RUN TestSublist/first_list_missing_additional_digits_from_second_list
=== RUN TestSublist/order_matters_to_a_list
=== RUN TestSublist/same_digits_but_different_numbers
--- PASS: TestSublist (0.00s)
--- PASS: TestSublist/empty_lists (0.00s)
--- PASS: TestSublist/empty_list_within_non_empty_list (0.00s)
--- PASS: TestSublist/non_empty_list_contains_empty_list (0.00s)
--- PASS: TestSublist/list_equals_itself (0.00s)
--- PASS: TestSublist/different_lists (0.00s)
--- PASS: TestSublist/false_start (0.00s)
--- PASS: TestSublist/consecutive (0.00s)
--- PASS: TestSublist/sublist_at_start (0.00s)
--- PASS: TestSublist/sublist_in_middle (0.00s)
--- PASS: TestSublist/sublist_at_end (0.00s)
--- PASS: TestSublist/at_start_of_superlist (0.00s)
--- PASS: TestSublist/in_middle_of_superlist (0.00s)
--- PASS: TestSublist/at_end_of_superlist (0.00s)
--- PASS: TestSublist/first_list_missing_element_from_second_list (0.00s)
--- PASS: TestSublist/second_list_missing_element_from_first_list (0.00s)
--- PASS: TestSublist/first_list_missing_additional_digits_from_second_list (0.00s)
--- PASS: TestSublist/order_matters_to_a_list (0.00s)
--- PASS: TestSublist/same_digits_but_different_numbers (0.00s)
=== RUN ExampleSublist
--- PASS: ExampleSublist (0.00s)
PASS
coverage: 100.0% of statements
ok sublist 1.014s coverage: 100.0% of statements
real 0m1.255s
user 0m0.299s
sys 0m0.188s
==============================================================================
Exit code: 0
real 0m1.615s
user 0m0.728s
sys 0m0.570s
real 0m1.617s
user 0m0.728s
sys 0m0.571s
===============================================================================
mv -v benchstat-new.txt benchstat-old.txt
renamed 'benchstat-new.txt' -> 'benchstat-old.txt'
gotest -v --run=xxx --bench . --benchmem |& tee benchstat-new.txt
goos: linux
goarch: amd64
pkg: sublist
cpu: 12th Gen Intel(R) Core(TM) i5-1240P
BenchmarkSublist
BenchmarkSublist-8 97245 10959 ns/op 2400 B/op 217 allocs/op
PASS
ok sublist 1.195s
real 0m1.361s
user 0m1.424s
sys 0m0.178s
===============================================================================
gotest -v -tags bonus
=== RUN TestSublist
=== RUN TestSublist/empty_lists
=== RUN TestSublist/empty_list_within_non_empty_list
=== RUN TestSublist/non_empty_list_contains_empty_list
=== RUN TestSublist/list_equals_itself
=== RUN TestSublist/different_lists
=== RUN TestSublist/false_start
=== RUN TestSublist/consecutive
=== RUN TestSublist/sublist_at_start
=== RUN TestSublist/sublist_in_middle
=== RUN TestSublist/sublist_at_end
=== RUN TestSublist/at_start_of_superlist
=== RUN TestSublist/in_middle_of_superlist
=== RUN TestSublist/at_end_of_superlist
=== RUN TestSublist/first_list_missing_element_from_second_list
=== RUN TestSublist/second_list_missing_element_from_first_list
=== RUN TestSublist/first_list_missing_additional_digits_from_second_list
=== RUN TestSublist/order_matters_to_a_list
=== RUN TestSublist/same_digits_but_different_numbers
--- PASS: TestSublist (0.00s)
--- PASS: TestSublist/empty_lists (0.00s)
--- PASS: TestSublist/empty_list_within_non_empty_list (0.00s)
--- PASS: TestSublist/non_empty_list_contains_empty_list (0.00s)
--- PASS: TestSublist/list_equals_itself (0.00s)
--- PASS: TestSublist/different_lists (0.00s)
--- PASS: TestSublist/false_start (0.00s)
--- PASS: TestSublist/consecutive (0.00s)
--- PASS: TestSublist/sublist_at_start (0.00s)
--- PASS: TestSublist/sublist_in_middle (0.00s)
--- PASS: TestSublist/sublist_at_end (0.00s)
--- PASS: TestSublist/at_start_of_superlist (0.00s)
--- PASS: TestSublist/in_middle_of_superlist (0.00s)
--- PASS: TestSublist/at_end_of_superlist (0.00s)
--- PASS: TestSublist/first_list_missing_element_from_second_list (0.00s)
--- PASS: TestSublist/second_list_missing_element_from_first_list (0.00s)
--- PASS: TestSublist/first_list_missing_additional_digits_from_second_list (0.00s)
--- PASS: TestSublist/order_matters_to_a_list (0.00s)
--- PASS: TestSublist/same_digits_but_different_numbers (0.00s)
=== RUN ExampleSublist
--- PASS: ExampleSublist (0.00s)
PASS
ok sublist 0.002s
real 0m0.126s
user 0m0.177s
sys 0m0.122s
===============================================================================
benchstat benchstat-old.txt benchstat-new.txt
benchstat-old.txt:5: missing iteration count
benchstat-new.txt:5: missing iteration count
goos: linux
goarch: amd64
pkg: sublist
cpu: 12th Gen Intel(R) Core(TM) i5-1240P
│ benchstat-old.txt │ benchstat-new.txt │
│ sec/op │ sec/op vs base │
Sublist-16 10.21µ ± ∞ ¹
Sublist-8 10.96µ ± ∞ ¹
geomean 10.21µ 10.96µ ? ² ³
¹ need >= 6 samples for confidence interval at level 0.95
² benchmark set differs from baseline; geomeans may not be comparable
³ ratios must be >0 to compute geomean
│ benchstat-old.txt │ benchstat-new.txt │
│ B/op │ B/op vs base │
Sublist-16 2.345Ki ± ∞ ¹
Sublist-8 2.344Ki ± ∞ ¹
geomean 2.345Ki 2.344Ki ? ² ³
¹ need >= 6 samples for confidence interval at level 0.95
² benchmark set differs from baseline; geomeans may not be comparable
³ ratios must be >0 to compute geomean
│ benchstat-old.txt │ benchstat-new.txt │
│ allocs/op │ allocs/op vs base │
Sublist-16 217.0 ± ∞ ¹
Sublist-8 217.0 ± ∞ ¹
geomean 217.0 217.0 ? ² ³
¹ need >= 6 samples for confidence interval at level 0.95
² benchmark set differs from baseline; geomeans may not be comparable
³ ratios must be >0 to compute geomean
real 0m0.003s
user 0m0.001s
sys 0m0.002s
===============================================================================
gomarkdoc --output sublist-doc.md
real 0m0.011s
user 0m0.004s
sys 0m0.008s
===============================================================================
go doc -all sublist
package sublist // import "sublist"
Package sublist is used to compare two lists with each other.
FUNCTIONS
func ListToString(list []int) string
ListToString returns a string representation of an int slice.
TYPES
type Relation string
Relation is the comparison between lists
const (
RelationEqual Relation = "equal"
RelationSublist Relation = "sublist"
RelationSuperlist Relation = "superlist"
RelationUnequal Relation = "unequal"
)
Possible relations
func Sublist(l1, l2 []int) Relation
Sublist returns the relationship between two lists.
real 0m0.044s
user 0m0.028s
sys 0m0.040s
===============================================================================