beats analyze

cadvisor
structural fingerprinting · ∛(seq × import × call)
2026-06-11 17:08:24
Clusters
16
structural patterns found
High Structural Confidence Score
16
std < 0.05 — tight
Medium Structural Confidence Score
0
0.05 ≤ std < 0.12
Low Structural Confidence Score
0
std ≥ 0.12 — broad
Metric Glossary
Structural Conformity & Confidence
Structural Conformity Tiers Derived from the standard deviation of arithmetic pairwise scores — (AST token-sequence similarity + import Jaccard + call-target Jaccard) / 3 — computed across all member pairs. Thresholds are calibrated to the natural spread of structural clusters (std devs typically 0.00–0.15).
High Structural Conformity Score (High StrcScore) (std < 0.05): members are near-identical — the cluster encodes a very tight, settled convention.
Medium Structural Conformity Score (Medium StrcScore) (0.05 ≤ std < 0.12): consistent pattern with variation — same structural family, some drift.
Low Structural Conformity Score (Low StrcScore) (std ≥ 0.12): broad structural family — shape is shared but with significant internal variation.
Confidence Score ln(size) × ln(numPackages+1) × confidence(tier) × meanScore² × (importCoh + callCoh) / 2 — a composite ranking signal.
ln(size): logarithmic prevalence weight — size matters, but diminishingly.
ln(numPackages+1): package-spread weight — patterns recurring across more packages are stronger signals of an established codebase-wide convention.
confidence: tier weight — High StrcScore = 1.0 / Medium StrcScore = 0.6 / Low StrcScore = 0.3.
meanScore²: structural tightness, squared — penalises loose clusters disproportionately; a score of 0.90 outweighs 0.75 by more than the raw difference suggests.
(importCoh + callCoh) / 2: coherence factor — rewards clusters where members share both import domain and call vocabulary, the strongest signal of a real settled convention.
Within each tier tab, clusters are sorted descending by this score.
Cluster metrics
IDFirst 6 hex characters of the ShapeHash — stable across beats init runs. Use this to reference a cluster in conversations or with teammates.
Common ShapeThe longest token subsequence present in every member of the cluster — the structural skeleton they all share. A longer shape means the cluster has a richer shared convention.
Avg Pairwise ScoreMean ∛(seqSim × importJaccard × callJaccard) over every unique member pair. The cube root is a geometric mean — all three dimensions must contribute; a zero on any one collapses the score to zero.
Member ScoreEach function's mean pairwise score against every other member. The lowest-scoring members are outlier candidates. A large gap between top and bottom member scores is a sign the cluster should be split.
Import Coh.Mean pairwise Jaccard of direct import sets. High (≥ 0.60) means the cluster operates in a shared package domain.
Call Coh.Mean pairwise Jaccard of call-target sets. High (≥ 0.60) means the cluster uses the same external vocabulary — a strong signal of shared structural role.
Token reference Every function is reduced to an ordered sequence of these tokens — no names, no literals, only structure.
CALLA plain local function call or builtin (make(), len()) or type conversion.
CALL_PKGA package-qualified call — the receiver is an imported package alias, e.g. fmt.Sprintf().
CALL_METHODA method or chained call — the receiver is a variable or struct field, e.g. w.Close().
ASSIGNA variable assignment or short variable declaration (:= or =).
RETURNA return statement. Each return value appends one RETURN token, encoding output arity into the shape.
IFAn if statement (including if err != nil guards). High frequency indicates defensive/error-handling code.
FOR / RANGEC-style for loop vs range-based iteration. RANGE is the most common iteration token in idiomatic Go.
SWITCH / CASESwitch statement with CASE tokens for each branch, encoding branching arity.
DEFERA defer statement. Signals resource cleanup or unlock patterns.
GO / SEND / SELECTGoroutine spawn, channel send, and channel multiplexing. Presence indicates concurrency in the control flow.
FUNCLITAn anonymous function / closure, e.g. passed as a callback or used in a goroutine launch.
COMPOSITE_LITA composite literal — struct, slice, map, or array initialisation, e.g. &Foo{}, []string{...}. High frequency indicates constructor-style or data-builder functions.
BINARY_OPA binary expression — arithmetic, comparison, or logical operator (+, ==, &&, etc.). Distinguishes computation-heavy functions from pure dispatch/delegation shapes.
TYPE_ASSERTA type assertion or type switch arm — x.(T). Signals interface-unwrapping patterns common in middleware, codec, or handler code.
Filtered noise Clusters whose trigram shape matches ≥ 5% of the entire corpus are suppressed — structural stop-words (e.g. a bare RETURN function) with no discriminating signal. They are excluded from all three tier tabs.
Score distribution — avg pairwise ∛(seq × imp × call)
0.55 – 0.65
0
0.65 – 0.75
0
0.75 – 0.85
0
0.85 – 0.95
5
0.95 – 1.00
11

Heavy clone concentration: 68% of clusters score above 0.95, indicating a large number of near-identical function pairs.

Size distribution — functions per cluster
3 – 4
11
5 – 9
5
10+
0

31% of clusters have 5 or more members, with 0 clusters of size 10+. A reasonable spread — the codebase has both local structural echoes and some broader recurring conventions.

Potential Outlier Charts
Package coverage — clustered vs outliers (top 20 by volume)
sysfs
13 / 0
fs
4 / 0
crio
4 / 0
zfs
4 / 0
devicemapper
4 / 0
podman
3 / 0
validate
3 / 0
containerd
3 / 0
utils
2 / 0
statsd
2 / 0
manager
2 / 0
cloudinfo
2 / 0
docker
2 / 0
stdout
2 / 0
overlay
1 / 0
btrfs
1 / 0
elasticsearch
1 / 0
netlink
1 / 0
intel
1 / 0
gce
1 / 0

clustered   structural outliers  ·  counts shown as clustered / outliers per package.

Clusters — sorted by confidence score ↓
· ·
scroll to explore
# ID Common Shape Size Avg Score CScore Import Coh. Call Coh. Packages Potential
1 814141 IFCALL_PKGASSIGNASSIGNIFRETURNCALL_PKGRETURNRETURNRETURN8141417009906073 5 1.000
2.88
1.00 1.00
containerdcriodockerpodmanraw
top imports: fmt, github.com/opencontainers/cgroups cyclo mean: 3.0
FunctionPackageFileLineScore
GetCgroupPathcontainerd container/containerd/handler.go 229
1.000
GetCgroupPathcrio container/crio/handler.go 334
1.000
GetCgroupPathdocker container/docker/handler.go 380
1.000
GetCgroupPathpodman container/podman/handler.go 307
1.000
GetCgroupPathraw container/raw/handler.go 249
1.000
2 db1847 ASSIGNCALL_PKGIFBINARY_OPRETURNRETURNCALLRETURNRETURNdb1847652ab28e3a 5 1.000
2.88
1.00 1.00
bigqueryelasticsearchinfluxdbkafkaredis
top imports: github.com/google/cadvisor/storage, os cyclo mean: 2.0
FunctionPackageFileLineScore
newbigquery storage/bigquery/bigquery.go 81
1.000
newelasticsearch storage/elasticsearch/elasticsearch.go 56
1.000
newinfluxdb storage/influxdb/influxdb.go 111
1.000
newkafka storage/kafka/kafka.go 97
1.000
newredis storage/redis/redis.go 50
1.000
3 ade12f ASSIGNIFRETURNCALL_PKGRETURNRETURNRETURNade12f5683b74cd9 7 0.951
2.85
1.00 1.00
devicemapperfsmanagerzfs
top imports: fmt cyclo mean: 2.0
FunctionPackageFileLineScore
GetUsagedevicemapper cadvisor/devicemapper/thin_pool_watcher.go 106
0.960
GetUsagezfs cadvisor/zfs/watcher.go 95
0.960
GetUsagezfs fs/zfs/watcher.go 94
0.960
getContainermanager cadvisor/manager/manager.go 592
0.954
getContainerDatamanager cadvisor/manager/manager.go 463
0.954
GetDeviceForLabelfs cadvisor/fs/fs.go 359
0.933
GetMountpointForDevicefs cadvisor/fs/fs.go 377
0.933
4 bbcc8b ASSIGNCALL_PKGIFBINARY_OPRETURNRETURNCOMPOSITE_LITRETURNRETURNbbcc8ba9061eb8a6 4 0.968
2.10
1.00 1.00
btrfsnfsoverlaytmpfs
top imports: github.com/google/cadvisor/fs, github.com/google/cadvisor/fs/vfs cyclo mean: 2.0
FunctionPackageFileLineScore
GetStatsbtrfs fs/btrfs/plugin.go 52
0.978
GetStatsoverlay fs/overlay/plugin.go 51
0.978
GetStatstmpfs fs/tmpfs/plugin.go 49
0.978
GetStatsnfs fs/nfs/plugin.go 56
0.935
5 ac79de ASSIGNCALL_PKGIFASSIGNCALL_METHODBINARY_OPRETURNRETURNRETURNac79de35d7d96752 3 1.000
1.52
1.00 1.00
containerdcrioutils
top imports: path cyclo mean: 2.0
FunctionPackageFileLineScore
ContainerNameToContainerdIDcontainerd container/containerd/factory.go 89
1.000
ContainerNameToCrioIdcrio container/crio/factory.go 98
1.000
ContainerNameToIdutils docker/utils/docker.go 109
1.000
6 25c47d IFCALL_PKGRETURNRETURNCALL_METHODCALL_PKGRETURN25c47dc0252d9ccf 3 1.000
1.52
1.00 1.00
containerdcrioutils
top imports: path, strings cyclo mean: 2.0
FunctionPackageFileLineScore
isContainerNamecontainerd container/containerd/factory.go 99
1.000
isContainerNamecrio container/crio/factory.go 110
1.000
IsContainerNameutils docker/utils/docker.go 121
1.000
7 b22405 CALL_METHODDEFERCALL_METHODIFASSIGNRETURNCALL_PKGASSIGNRETURNRETURNb22405d954806239 3 0.961
1.41
1.00 1.00
containerfsresctrl
top imports: fmt cyclo mean: 2.0
FunctionPackageFileLineScore
RegisterPluginfs cadvisor/fs/plugin.go 109
0.971
RegisterPluginresctrl cadvisor/resctrl/factory.go 40
0.971
RegisterPlugincontainer cadvisor/container/factory.go 189
0.941
8 2551bf ASSIGNCALL_PKGASSIGNCALL_PKGIFBINARY_OPRETURNRETURNCALL_PKGCALLRETURNRETURN2551bf6e58fed7c5 7 1.000
1.35
1.00 1.00
sysfs
top imports: fmt, os, strings cyclo mean: 2.0
FunctionPackageFileLineScore
GetBookIDsysfs utils/sysfs/sysfs.go 180
1.000
GetCPUPhysicalPackageIDsysfs utils/sysfs/sysfs.go 171
1.000
GetCoreIDsysfs utils/sysfs/sysfs.go 162
1.000
GetDistancessysfs utils/sysfs/sysfs.go 207
1.000
GetDrawerIDsysfs utils/sysfs/sysfs.go 189
1.000
GetHugePagesNrsysfs utils/sysfs/sysfs.go 224
1.000
GetMemInfosysfs utils/sysfs/sysfs.go 198
1.000
9 643565 ASSIGNCALL_METHODASSIGNCALL_METHODASSIGNASSIGNASSIGNASSIGNRETURNRETURNRETURN643565d7bfb6b68f 3 0.893
1.25
1.00 1.00
criodockerpodman
top imports: github.com/google/cadvisor/container, github.com/google/cadvisor/container/common, github.com/google/cadvisor/info/v1 cyclo mean: 1.7
FunctionPackageFileLineScore
GetSpecdocker container/docker/handler.go 327
0.907
GetSpecpodman container/podman/handler.go 262
0.903
GetSpeccrio container/crio/handler.go 223
0.869
10 2d60f1 ASSIGNCALL_PKGCALL_PKGIFBINARY_OPRETURNRETURNCALLRETURNRETURN2d60f1a735ae1743 6 1.000
1.24
1.00 1.00
sysfs
top imports: os, path cyclo mean: 2.0
FunctionPackageFileLineScore
GetBlockDeviceNumberssysfs utils/sysfs/sysfs.go 241
1.000
GetBlockDeviceSchedulersysfs utils/sysfs/sysfs.go 267
1.000
GetBlockDeviceSizesysfs utils/sysfs/sysfs.go 275
1.000
GetNetworkAddresssysfs utils/sysfs/sysfs.go 309
1.000
GetNetworkMtusysfs utils/sysfs/sysfs.go 317
1.000
GetNetworkSpeedsysfs utils/sysfs/sysfs.go 325
1.000
11 3fd615 ASSIGNCALLIFBINARY_OPRETURNCALL_PKGIFBINARY_OPRETURNCALL_PKGRETURNRETURN3fd61597bfb1a7d6 3 0.879
1.22
1.00 1.00
intelnetlinkpodman
top imports: fmt cyclo mean: 3.7
FunctionPackageFileLineScore
GetExitCodepodman container/podman/handler.go 348
0.894
checkMonitoringGroupintel resctrl/intel/collector.go 98
0.882
Newnetlink cpuload/netlink/reader.go 33
0.861
12 2353be ASSIGNCALL_METHODIFBINARY_OPCALL_METHODFORSELECTCOMMRETURNCOMMCALL_PKGASSIGNCALL_PKGASSIGNCALL_METHODIFBINARY_OPCALL_METHODASSIGNCALL_PKGCALL_METHODCALL_METHODCALL_METHOD2353be5cb8e04311 3 1.000
1.21
1.00 1.00
devicemapperzfs
top imports: time cyclo mean: 6.0
FunctionPackageFileLineScore
Startdevicemapper cadvisor/devicemapper/thin_pool_watcher.go 76
1.000
Startzfs cadvisor/zfs/watcher.go 65
1.000
Startzfs fs/zfs/watcher.go 64
1.000
13 e7af89 ASSIGNCALL_PKGIFBINARY_OPRETURNRETURNCALL_PKGCALLRETURNe7af8916834d7358 3 1.000
1.21
1.00 1.00
cloudinfogce
top imports: os, strings cyclo mean: 2.0
FunctionPackageFileLineScore
IsActiveProvidercloudinfo cloudinfo/azure/azure.go 39
1.000
fileContainsAmazonIdentifiercloudinfo cloudinfo/aws/aws.go 51
1.000
IsActiveProvidergce cloudinfo/gce/gce.go 41
1.000
14 cb40f8 RANGEASSIGNBINARY_OPBINARY_OPBINARY_OPBINARY_OPCALL_PKGcb40f81282d4f090 4 0.862
1.20
1.00 1.00
statsdstdout
top imports: github.com/google/cadvisor/info/v1, strconv cyclo mean: 2.5
FunctionPackageFileLineScore
perfStatsToValuesstatsd storage/statsd/statsd.go 188
0.862
perfStatsToValuesstdout storage/stdout/stdout.go 193
0.862
resctrlStatsToValuesstatsd storage/statsd/statsd.go 194
0.862
resctrlStatsToValuesstdout storage/stdout/stdout.go 199
0.862
15 d60d08 ASSIGNCALL_PKGASSIGNCALL_PKGIFBINARY_OPCALLRETURNCALL_PKGASSIGNCALL_PKGIFBINARY_OPRETURNASSIGNCALL_PKGIFBINARY_OPRETURNRETURNRETURNRETURNRETURNd60d080b435215a9 3 0.931
1.06
1.00 1.00
devicemapperfs
top imports: fmt, strconv, strings cyclo mean: 4.7
FunctionPackageFileLineScore
ParseDMTabledevicemapper fs/devicemapper/stats.go 68
0.948
parseDMTablefs cadvisor/fs/fs.go 751
0.948
parseDMStatusdevicemapper fs/devicemapper/stats.go 46
0.896
16 3bbdbe ASSIGNIFASSIGNCALL_PKGRETURNIFBINARY_OPRETURNRETURNRETURNRETURN3bbdbee6337759f9 3 0.852
0.59
1.00 1.00
validate
top imports: fmt cyclo mean: 5.0
FunctionPackageFileLineScore
validateDockerVersionvalidate cadvisor/validate/validate.go 81
0.887
validateKernelVersionvalidate cadvisor/validate/validate.go 58
0.868
areCgroupsPresentvalidate cadvisor/validate/validate.go 123
0.801
Potential outliers