2022-01-01ãã1å¹´éã®è¨äºä¸è¦§
TL; DR t.Run ã§ãã¹ããããã¹ããå®è¡ããæãRunã«æ¸¡ãé¢æ°ã¯ãããã¬ãã«ã®ãã¹ããå®è¡ããã¦ããã®ã¨å¥ã®goroutineã§å®è¡ããã¦ããã®ã§Parameterized Testãªããããã£ã¦ãå ´åãå¤æ°ã®ã¹ã³ã¼ãã«æ³¨æãã¾ãããã
runtime.MemStats ã使ãã¨ç¾æç¹ã§ã®ã¡ã¢ãªã®ä½¿ç¨ç¶æ³ãªã©ã確èªã§ãã¾ãã ã¨ããããã以ä¸ã®ãããªã³ã¼ããåããã¨Alloc (å²ãå½ã¦ããããã¼ããªãã¸ã§ã¯ãã®ãã¤ãæ°) ã¨NumGC (GCã®åæ°) ã確èªã§ãã¾ããã¤ãã§ã«æéä¸ã®æ大ã®Allocã確èªãã¦ãã¾â¦
ä»åã¯ä½å® ãã¼ã³ã«é¢ãã¦ã ä½å® ãã¼ã³æ¢ã å¤å or åºå® éè¡é¸ã³ å£ä¿¡è½ã¡ã 審æ»éé ä½è« (è·æ´æ¸) è¨äºä¸è¦§
æ¨å¹´æ«ã«å®¶ (建売æ°ç¯) ãè²·ã£ãã®ã§ãã®è¨é²ã§ããä»åã¯è³¼å ¥ããæã¾ã§ã 家ãè²·ãã«è³ã£ãçµç·¯ å®æå家å¥ç´ã®çµäº è³è²¸ or æã¡å®¶ 家æ¢ã ãã³ã·ã§ã³ or æ¸å»ºã¦ ãã³ã·ã§ã³ã®ç¹å¾´ æ¸å»ºã¦ã®ç¹å¾´ æ¸å»ºã¦æ¢ã 決ãããã¤ã³ã 妥åããç¹ ä½è« è¨äºä¸è¦§