{"id":13471706,"url":"https://github.com/bradfitz/shotizam","last_synced_at":"2025-04-05T01:09:29.363Z","repository":{"id":47544389,"uuid":"253883914","full_name":"bradfitz/shotizam","owner":"bradfitz","description":"Shotizam analyzes the size of Go binaries","archived":false,"fork":false,"pushed_at":"2024-04-04T03:46:39.000Z","size":73,"stargazers_count":591,"open_issues_count":2,"forks_count":14,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-11T14:20:47.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradfitz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-07T18:49:45.000Z","updated_at":"2024-06-05T04:52:43.387Z","dependencies_parsed_at":"2024-04-04T04:42:39.217Z","dependency_job_id":null,"html_url":"https://github.com/bradfitz/shotizam","commit_stats":null,"previous_names":["bradfitz/gosize"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradfitz%2Fshotizam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradfitz%2Fshotizam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradfitz%2Fshotizam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradfitz%2Fshotizam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradfitz","download_url":"https://codeload.github.com/bradfitz/shotizam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271532,"owners_count":20911587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:00:48.464Z","updated_at":"2025-04-05T01:09:29.347Z","avatar_url":"https://github.com/bradfitz.png","language":"Go","funding_links":[],"categories":["开源类库","Go","Open source library"],"sub_categories":["代码分析","Code Analysis"],"readme":"# Shotizam\n\nShotizam analyzes the size of Go binaries and outputs SQL with size\ninfo for analysis in SQLite3.\n\n```\n$ shotizam --sqlite /some/go.binary\nSQLite version 3.28.0 2019-04-15 14:49:49\nEnter \".help\" for usage hints.\nsqlite\u003e .width 40\nsqlite\u003e .mode column\n\nsqlite\u003e select func, sum(size) from bin where func \u003c\u003e '' group by 1 order by 2 desc limit 20;\nunicode.init                              21528\ndebug/dwarf.init                          13764\nfmt.(*pp).printValue                      11941\ndebug/macho.NewFile                       10017\ntime.Time.AppendFormat                    9949\nruntime.gentraceback                      8278\ndebug/elf.NewFile                         7631\nruntime.selectgo                          6722\nencoding/binary.Read                      6555\nmain.main                                 6476\ninternal/fmtsort.compare                  6373\ntime.LoadLocationFromTZData               5795\nfmt.(*pp).doPrintf                        5520\nruntime.findrunnable                      5287\nruntime.typesEqual                        4843\ntime.nextStdChunk                         4736\ntime.ParseDuration                        4440\ntime.loadTzinfoFromZip                    4234\nruntime.(*pageAlloc).find                 4109\nruntime.heapBitsSetType                   3938\n\nsqlite\u003e select what, sum(size) from bin group by 1;\nTODO                                      1370985\nfixedheader                               101800\nfuncdata                                  99656\nfuncname                                  63062\npcdata0-regmap                            54361\npcdata1-stackmap                          47977\npcdata2-inltree                           40024\npcfile                                    38544\npcln                                      141103\npcsp                                      36478\ntext                                      896722\n\nsqlite\u003e select pkg, sum(size) from bin where pkg \u003c\u003e '' group by 1 order by 2 desc limit 20;\nruntime               621236\nreflect               187926\nfmt                   61727\ntime                  58786\nstrconv               55817\nsyscall               39481\ndebug/elf             37070\nos                    36707\ncompress/flate        31462\ndebug/macho           27117\nencoding/binary       26637\nos/exec               26599\ninternal/reflectlite  23687\nunicode               22316\nsync                  21322\nflag                  20871\ndebug/dwarf           17692\ninternal/poll         17092\nstrings               15511\nsort                  14992\n\nsqlite\u003e select func, length(func) from bin order by 2 desc limit 5;\ntype..eq.[67]struct { runtime.size uint3  89\ntype..eq.[67]struct { runtime.size uint3  89\ntype..eq.[67]struct { runtime.size uint3  89\ntype..eq.[67]struct { runtime.size uint3  89\ntype..eq.[67]struct { runtime.size uint3  89\n\nsqlite\u003e select func, sum(size) from bin where what = 'pcfile' and func \u003c\u003e '' group by 1 order by 2 desc limit 20;\ninternal/fmtsort.compare                  268\nfmt.(*pp).printValue                      227\nencoding/binary.Read                      195\nos.Getwd                                  174\nruntime.sighandler                        172\nruntime.(*pageAlloc).scavengeOne          153\nruntime.findrunnable                      148\ndebug/macho.NewFile                       131\nruntime.selectgo                          130\nsyscall.forkAndExecInChild                129\nmain.main                                 123\nruntime.(*mspan).sweep                    123\ninternal/fmtsort.nilCompare               119\nruntime.growslice                         119\ndebug/elf.NewFile                         112\nfmt.intFromArg                            107\nruntime.greyobject                        105\nruntime.evacuate_fast64                   103\nruntime.mapaccess2_faststr                101\nruntime.evacuate                          99\n\nsqlite\u003e select func, sum(size) from bin where what = 'pcln' and func \u003c\u003e '' group by 1 order by 2 desc limit 20;\ntime.Time.AppendFormat                    1347\nruntime.gentraceback                      1132\nruntime.selectgo                          1102\nfmt.(*pp).printValue                      1027\nruntime.findrunnable                      830\nruntime.heapBitsSetType                   794\ninternal/fmtsort.compare                  720\nruntime.memmove                           720\ndebug/macho.NewFile                       692\nfmt.(*pp).doPrintf                        638\nencoding/binary.Read                      616\nruntime.runGCProg                         613\nsyscall.forkAndExecInChild                552\ndebug/elf.NewFile                         539\nruntime.mallocgc                          532\ntime.LoadLocationFromTZData               530\nruntime.duffcopy                          528\naeshashbody                               518\nruntime.(*mspan).sweep                    502\nruntime.sighandler                        478\n\nsqlite\u003e select * from bin limit 30;\ngo.buildid                                            fixedheader  40\ngo.buildid                                            text         112\ngo.buildid                                            funcname     11\ninternal/cpu.Initialize                   internal/c  fixedheader  40\ninternal/cpu.Initialize                   internal/c  pcsp         13\ninternal/cpu.Initialize                   internal/c  pcfile       5\ninternal/cpu.Initialize                   internal/c  pcln         21\ninternal/cpu.Initialize                   internal/c  pcdata0-reg  22\ninternal/cpu.Initialize                   internal/c  pcdata1-sta  21\ninternal/cpu.Initialize                   internal/c  text         80\ninternal/cpu.Initialize                   internal/c  funcname     24\ninternal/cpu.processOptions               internal/c  fixedheader  40\ninternal/cpu.processOptions               internal/c  pcsp         24\ninternal/cpu.processOptions               internal/c  pcfile       6\ninternal/cpu.processOptions               internal/c  pcln         167\ninternal/cpu.processOptions               internal/c  pcdata0-reg  30\ninternal/cpu.processOptions               internal/c  pcdata1-sta  60\ninternal/cpu.processOptions               internal/c  text         1792\ninternal/cpu.processOptions               internal/c  funcname     28\ninternal/cpu.indexByte                    internal/c  fixedheader  40\ninternal/cpu.indexByte                    internal/c  pcsp         9\ninternal/cpu.indexByte                    internal/c  pcfile       5\ninternal/cpu.indexByte                    internal/c  pcln         21\ninternal/cpu.indexByte                    internal/c  pcdata0-reg  22\ninternal/cpu.indexByte                    internal/c  text         64\ninternal/cpu.indexByte                    internal/c  funcname     23\ninternal/cpu.doinit                       internal/c  fixedheader  40\ninternal/cpu.doinit                       internal/c  pcsp         22\ninternal/cpu.doinit                       internal/c  pcfile       5\ninternal/cpu.doinit                       internal/c  pcln         159\n```\n\netc\n\nFor fun bugs to make Go smaller, see https://github.com/golang/go/labels/binary-size\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradfitz%2Fshotizam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradfitz%2Fshotizam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradfitz%2Fshotizam/lists"}