sourcefuncsize(1)

✨ sourcefuncsize(1) β€” hxtools girlies rise up ✨

okay so bestie, welcome to sourcefuncsize, a lil tool from the hxtools collection πŸ’– it's giving "I want to know how fat my functions are" and honestly? same.


πŸŽ€ NAME πŸŽ€

sourcefuncsize β€” statistical analysis of code 🧚


🌸 SYNTAX 🌸

sourcefuncsize [-bcelvx]

πŸ¦‹ DESCRIPTION πŸ¦‹

sourcefuncsize shows you the (textual) size of each function. That's it, that's the whole vibe πŸ’…

lowkey important: this is for C/C++ only. if you feed it your Python it's gonna be confused and so will you 😭

✨ OPTIONS ✨

  • -b β€” sort by bytes consumed. this is the default, so if you don't say anything it just... does this. iconic of it honestly πŸ‘‘
  • -c β€” show the classification with color 🌈 because plain text is fine but rainbow text is everything
  • -e β€” report global-scope empty lines when -x is selected. yes it needs -x, they're a package deal fr fr
  • -ee β€” count the empty lines inside functions as part of the global-scope empty lines. double e, double the empty-line drama πŸ™ˆ
  • -l β€” sort by lines consumed. the byte girlies could never πŸ’€
  • -v β€” shows file lines, function names, cumulative function lines and classification. the verbose queen, she does the most and we love her for it ⭐
  • -x β€” extended classification πŸ”₯ by default you only get function or outside a function, but with -x you also get Comment and Preprocessor. the glow-up is real ✨

πŸ“ EXAMPLES πŸ“

$ sourcefuncsize <src/octl.c>
 BYTES            LINES           FUNCTION
  3775( 15.22%)     112( 14.95%)  play
  3451( 13.92%)      93( 12.42%)  playrec_getopt
  3146( 12.69%)     104( 13.89%)  [Other data]
  3101( 12.50%)     103( 13.75%)  mixer_proc_ctl
  2999( 12.09%)      86( 11.48%)  record
  2047(  8.25%)      63(  8.41%)  playrec_setopt
  1982(  7.99%)      47(  6.28%)  mixer
   974(  3.93%)      30(  4.01%)  mixer_proc
   850(  3.43%)      30(  4.01%)  mixer_write_recsrc
   787(  3.17%)      25(  3.34%)  mixer_display_all
   756(  3.05%)      17(  2.27%)  main
   338(  1.36%)      15(  2.00%)  sighandler
   327(  1.32%)      13(  1.74%)  mixer_inst_dev
   267(  1.08%)      11(  1.47%)  mixer_read_recsrc

look at play carrying the whole file on her back 😭 3775 bytes, 15.22% β€” main character energy fr.


πŸ’œ SEE ALSO πŸ’œ

  • hxtools(7) β€” the whole hxtools family, go say hi 🫢

that's the whole page bestie, no cap. now go profile your functions and tell me who's the biggest diva in your codebase πŸ’…βœ¨

this page came to you from hxtools, dated 2008-02-06, and it's sourcefuncsize(1) β€” periodt πŸŽ€