parallelize.go ×5

Frontier kind: Code frontier

unlabeled · c_0948b9432775

6 tests · 18 LOC · 1 file · introduces 0 tests · 18 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges18 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5 ranges18 lines · 1 file · Browse complete extent
All tests (intent)
6 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationparallelize.go ×2 · 7 introduced LOCparallelize.go ×2parallelize.go ×1 · 2 introduced LOCparallelize.go ×1parallelize.go ×8 · 21 introduced LOCparallelize.go ×8parallelize.go ×2 · 5 introduced LOCparallelize.go ×2parallelize.go ×3 · 5 introduced LOCparallelize.go ×3parallelize.go ×2 · 3 introduced LOCparallelize.go ×2parallelize.go ×15 · 33 introduced LOCparallelize.go ×15parallelize.go ×1 · 2 introduced LOCparallelize.go ×1parallelize.go ×1 · 2 introduced LOCparallelize.go ×1parallelize.go ×1 · 1 introduced LOCparallelize.go ×1parallelize.go ×1 · 1 introduced LOCparallelize.go ×1parallelize.go ×1 · 2 introduced LOCparallelize.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/tools/parallelize/parallelize.go · 198 LOCparallelize/parallelize.…TestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestProcessDir · introduced test · go.temporal.io/server/tools/parallelize/TestProcessDirTestProcessDiradds_t.Parallel_to_multiple_tests · introduced test · go.temporal.io/server/tools/parallelize/TestProcessFile/adds_t.Parallel_to_multiple_testsadds_t.Parallel_to_multi…skips_non-test_functions · introduced test · go.temporal.io/server/tools/parallelize/TestProcessFile/skips_non-test_functionsskips_non-test_functionsskips_test_suite_methods · introduced test · go.temporal.io/server/tools/parallelize/TestProcessFile/skips_test_suite_methodsskips_test_suite_methodsskips_test_that_already_has_t.Parallel · introduced test · go.temporal.io/server/tools/parallelize/TestProcessFile/skips_test_that_already_has_t.Parallelskips_test_that_already_…skips_test_with_parallelize:ignore · introduced test · go.temporal.io/server/tools/parallelize/TestProcessFile/skips_test_with_parallelize:ignoreskips_test_with_parallel…Focused concept · parallelize.go ×5 · 18 introduced LOCparallelize.go ×5

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 18 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/tools/parallelize/parallelize.go 18 introduced LOC · 5 ranges

Open complete file

43 }
44
45 > func processFile(path string) error { parallelize.go
46 > fset := token.NewFileSet()
47 > f, err := parser.ParseFile(fset, path, nil, parser.ParseComments)
48 > if err != nil {
49 return fmt.Errorf("parse %s: %w", path, err)
50 }
52 // Collect line numbers where we need to insert t.Parallel().
53 // Each entry is the line of the opening '{' of the test function body.
54 > type insertion struct { parallelize.go
55 > line int // line number of the '{' opening the function body
56 > paramName string // name of the *testing.T parameter
57 > }
58 > var insertions []insertion
59 >
60 > for _, decl := range f.Decls {
61 > fn, ok := decl.(*ast.FuncDecl)
62 > if !ok {
63 > continue
64 }
65 > if !isTestFunc(fn) { parallelize.go
66 continue
67 }
80 }
81
82 > if len(insertions) == 0 { parallelize.go
83 return nil
84 }
118
119 // isTestFunc returns true for func TestXxx(t *testing.T).
120 > func isTestFunc(fn *ast.FuncDecl) bool { parallelize.go
121 > if fn.Recv != nil {
122 return false // method, not a function
123 }