@derrickstolee ã¯æè¿ãããã¤ãã®ç°ãªã git clone
 ã®æ¹æ³ã«ã¤ãã¦æ¤è¨ãã¾ãããããããã®é¸æè¢ã¯å®éã« Git ã®ããã©ã¼ãã³ã¹ã«ã©ã®ãããªå½±é¿ãä¸ããã®ã§ããããï¼ããªãã®ã¯ã©ã¤ã¢ã³ãã§ã¯ã©ã®é¸æè¢ãä¸çªéãã®ã§ããããï¼ããªãã®ãã«ããã·ã³ã§ã¯ã©ã®é¸æè¢ãä¸çªéãã®ã§ããããï¼ãããã®é¸æè¢ã¯ãµã¼ãã¼ã®ããã©ã¼ãã³ã¹ã«ã©ã®ãããªå½±é¿ãä¸ããã®ã§ããããï¼ããããªãã GitHub Enterprise Server ã®ç®¡çè
ã§ããã°ãè¤æ°ã®åæãªã¯ã¨ã¹ãããã£ãå ´åã«ãµã¼ãã¼ããããã®é¸æè¢ã«ã©ã®ããã«åå¿ããããç解ãã¦ãããã¨ã¯éè¦ã§ãã
GitHub ã§ã¯ããããã®çåã«çããããã«ãã¼ã¿é§ååã®ã¢ããã¼ããæ¡ç¨ãã¾ãããç§ãã¡ã¯ããããã®ç°ãªãã¯ãã¼ã³ã®é¸æè¢ãæ¯è¼ããå®é¨ãè¡ããã¯ã©ã¤ã¢ã³ãã¨ãµã¼ãã¼ã®æåã測å®ãã¾ããã git clone
 ã®æéãæ¯è¼ããã ãã§ã¯ååã§ã¯ããã¾ãããã¯ãã¼ã³ã¯ Git ãªãã¸ããªã¨ã®ããåãã®å§ã¾ãã«éããªãããã§ããç¹ã«ç§ãã¡ã¯ãããããã®ã¯ãã¼ã³ã®é¸æè¢ã git fetch
 ã®ãããªä»¥å¾ã® Git æä½ã®æåã«ã©ã®ããã«å½±é¿ãä¸ããã®ã調ã¹ããã¨èãã¦ãã¾ããã
ãã®å®é¨ã§ã¯ã以ä¸ã®çåã«çãããã¨ãç®æãã¾ããï¼
- ããããã®Â
git clone
 ã³ãã³ãã¯ã©ããããã®éããï¼ - ãªãã¸ããªãã¯ãã¼ã³ãããã以å¾ã®Â
git fetch
 ã³ãã³ãã¯ãµã¼ãã¼ãã¯ã©ã¤ã¢ã³ãã«ã©ã®ãããªå½±é¿ãä¸ããã®ãï¼ - ãã«ã¯ãã¼ã³ãã·ã£ãã¼ã¯ãã¼ã³ããã¼ã·ã£ã«ã¯ãã¼ã³ã¯ Git ãµã¼ãã¼ã«ã©ã®ãããªå½±é¿ãä¸ããã®ãï¼ããã¯ãGitHub Enterprise Server ã®ç®¡çè ã«ã¨ã£ã¦éè¦ãªãã¨ã§ãã
- ãªãã¸ããªã®æ§æããµã¤ãºã¯ãå ¨ä½ã®ããã©ã¼ãã³ã¹ã«ä½ãéãããããããï¼
å®é¨ã®çµæã¯ãç§ãã¡ã®ç®¡çãããç°å¢ã§è¡ã£ãã·ãã¥ã¬ã¼ã·ã§ã³ã«åºã¥ããã®ã§ãããå¤ãã® Git ã¦ã¼ã¶ã¼ã使ç¨ãããããããªãè¤éãªã¯ã¼ã¯ããã¼ãã·ãã¥ã¬ã¼ããããã®ã§ã¯ãªããã¨ãç¹ã«å¼·èª¿ãã¦ããã¾ããã使ãã®ã¯ã¼ã¯ããã¼ããªãã¸ããªã®ç¹æ§ã«ãã£ã¦ã¯ããããã®çµæã¯å¤ããããããã¾ãããããããã®å®é¨ã¯ãã¯ã¼ã¯ããã¼ããããã®é¸æè¢ã«ãã£ã¦ã©ã®ãããªå½±é¿ãåãããã測å®ããããã®ãã¬ã¼ã ã¯ã¼ã¯ã¨ãªãå¾ãã§ããããçããèªèº«ã®ã¯ã¼ã¯ããã¼ãåæãããå ´åã¯ãGitHub ã®ãããã§ãã·ã§ãã«ãµã¼ãã¹ãã¼ã ã¾ã§ãæ°è»½ã«ãåãåãããã ããã
å®é¨çµæã®æ¦è¦ã«ã¤ãã¦ã¯ãçµè«ã¨æ¨å¥¨äºé ã御覧ãã ããã
å®é¨ã®è¨ç»
å®é¨ã®åç¾æ§ãæ大éã«é«ããããã«ããµã³ãã«ãã¼ã¿ã«ã¯ãªã¼ãã³ã½ã¼ã¹ã®ãªãã¸ããªã使ç¨ãã¦ãã¾ãããããããã¨ã§ãçããã®ãªãã¸ããªã®æ§æã¨å®é¨ã§ä½¿ç¨ãããªãã¸ããªãæ¯è¼ãã¦ãã©ã®ã·ããªãªãçããã®ã±ã¼ã¹ã«æé©ãã確èªãããã¨ãã§ãã¾ãã
ç§ãã¡ã¯ãjquery/jquery
ãapple/swift
ãtorvalds/linux
 ã®ãªãã¸ããªã使ç¨ãããã¨ã«ãã¾ããããããä¸ã¤ã®ãªãã¸ããªã¯ããµã¤ãºãã³ãããæ°ãããããããªã¼ã®æ°ãããããç°ãªãã¾ãã
ãããã®ãªãã¸ããªããGitHub Enterprise Server ãã¼ã¸ã§ã³ 2.22 ã 8 ã³ã¢ã®ã¯ã©ã¦ããã·ã³ä¸ã«åä½ãããç°å¢ã«ãã©ã¼ãã¾ãããGatling ããã¼ã¹ã«ãã社å
ã®è² è·ãã¹ããã¼ã«ã使ç¨ãã¦ããã¹ãã¤ã³ã¹ã¿ã³ã¹ã«å¯¾ãã git
 ãªã¯ã¨ã¹ããçæãã¾ãããäºã¤ã®ç°ãªããã¼ãã¸ã§ãã¬ã¼ã¿ã¼ã使ã£ã¦ãç¹å®ã®ã¦ã¼ã¶ã¼æ°ã®ãã¹ãã 30 åéå®è¡ãã¾ããããã¹ã¦ã®ãã¼ãã¸ã§ãã¬ã¼ã¿ã¼ã¯Â git version 2.28.0
 ã使ç¨ãã¦ãããããã©ã«ãã§ã¯ãããã³ã«ãã¼ã¸ã§ã³ 1 ã使ç¨ãã¦ãã¾ãããããã³ã«ãã¼ã¸ã§ã³ 2 㯠Git ã®åç
§ã®åºåå¦çãæ¹åããã ããªã®ã§ãããããã¹ãã«å½±é¿ãä¸ããã¨ã¯èãã¦ãã¾ããã
ãã¹ããå®äºããã¨ãGatling ã®çµæã¨ã ghe-governor
 ã¨ãµã¼ãã¼ã®å¥å
¨æ§ã«é¢ããã¡ããªã¯ã¹ãçµã¿åããã¦ãã¹ããåæãã¾ãã
ãã¹ããªãã¸ããªã®ç¹æ§
git-sizer ã¨ãããã¼ã«ã¯ãGit ãªãã¸ããªã®ãµã¤ãºããã¾ãã¾ãªå´é¢ã§æ¸¬å®ãã¾ããä»åã¯ç¹ã«ãã£ã¹ã¯ä¸ã®ç·ãµã¤ãºã¨ãªãã¸ã§ã¯ãã¿ã¤ããã¨ã®æ°ã«æ³¨ç®ãã¾ããä¸ã®è¡¨ã¯ãä¸ã¤ã®ãã¹ããªãã¸ããªã®æ å ±ãã¾ã¨ãããã®ã§ãã
ãªãã¸ã㪠| ããã | ããªã¼ | ã³ããã | ãµã¤ãº (MB) |
---|---|---|---|---|
jquery/jquery |
14,779 | 22,579 | 7,873 | 40 |
apple/swift |
390,116 | 649,322 | 132,316 | 750 |
torvalds/linux |
2,174,798 | 4,619,864 | 968,500 | 4,000 |
jquery/jquery
 ãªãã¸ããªã¯ããã£ã¹ã¯å®¹éã 40MB ãããªãããªãå°ããªãªãã¸ããªã§ããapple/swift
 ã¯ä¸è¦æ¨¡ã®ãªãã¸ããªã§ãã³ãããæ°ã¯ç´ 13 ä¸ä»¶ããã£ã¹ã¯å®¹é㯠750MB ã§ããtorvalds/linux
 ãªãã¸ããªã¯ããªã¼ãã³ã½ã¼ã¹ãªãã¸ããªã® Git ããã©ã¼ãã³ã¹ãã¹ãã®å®çªã§ãããã£ã¹ã¯å®¹é㯠4 ã®ã¬ãã¤ãã§ãã³ãããæ°ã¯ 100 ä¸ä»¶è¿ãã«ãªãã¾ãã
ãã¹ãã·ããªãª
ä»åã¯ä»¥ä¸ã®ã¯ãã¼ã³ãªãã·ã§ã³ãæ¤è¨ãã¾ãï¼
- ãã«ã¯ãã¼ã³
- ã·ã£ãã¼ã¯ãã¼ã³ (
--depth=1
) - ããªã¼ã¬ã¹ã¯ãã¼ã³ (
--filter=tree:0
) - ãããã¬ã¹ã¯ãã¼ã³ (
--filter=blob:none
)
ã¯ãã¼ã³æã®ãããã®ãªãã·ã§ã³ã«å ãã¦ããã§ããæã«Â --depth=1
 ã使ã£ã¦åå¾ãããã¨ãã§ãã¾ããããªã¼ã¬ã¹ã¯ãã¼ã³ã¨ãããã¬ã¹ã¯ãã¼ã³ã«ã¯ã git fetch
 æã«ãã¦ã³ãã¼ãããããªãã¸ã§ã¯ããæ¸ããç¬èªã®æ¹æ³ãããã®ã§ãã·ã£ãã¼ãã§ããããã¹ãããã®ã¯ãã«ã¯ãã¼ã³ã¨ã·ã£ãã¼ã¯ãã¼ã³ã ãã«ãã¾ããã
ãã¹ãã·ããªãªã¯ãT1 ãã T10 ã¾ã§ã® 10 種é¡ã®ã«ãã´ãªã«åé¡ãã¾ãããT1 ãã T4 ã¯ãå種é¡ã®ç°ãªã git clone
 ãã·ãã¥ã¬ã¼ããããã®ã§ããT5 ãã T10 ã¯ããããã®ã¯ãã¼ã³ããããªãã¸ããªã¸ã®ãã¾ãã¾ãªÂ git fetch
 æä½ãã·ãã¥ã¬ã¼ããããã®ã§ãã
ãã¹ãçªå· | git ã³ãã³ã | 説æ |
---|---|---|
T1 | git clone |
ãã«ã¯ãã¼ã³ |
T2 | git clone --depth 1 |
ã·ã£ãã¼ã¯ãã¼ã³ |
T3 | git clone --filter=tree:0 |
ããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ |
T4 | git clone --filter=blob:none |
ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ |
T5 | T1 +Â git fetch |
ãã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã |
T6 | T1 +Â git fetch --depth 1 |
ãã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ã·ã£ãã¼ãã§ãã |
T7 | T2 +Â git fetch |
ã·ã£ãã¼ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã |
T8 | T2 +Â git fetch --depth 1 |
ã·ã£ãã¼ã¯ãã¼ã³ãªãã¸ããªã§ã®ã·ã£ãã¼ãã§ãã |
T9 | T3 +Â git fetch |
ããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã |
T10 | T4 +Â git fetch |
ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã |
ãã¼ã·ã£ã«ã¯ãã¼ã³ã§ã¯ãæ°ããåç
§å
ã«ããæ°ãããããã¯ããã®ã³ãããã«ç§»åãã¦ä½æ¥ãã£ã¬ã¯ããªä¸ã«ãã®ãããã®å
容ãè¨ç½®ããã¾ã§ã¯ãã¦ã³ãã¼ãããã¾ããããã«ã¯ãã¼ã³ã¨ã·ã£ãã¼ã¯ãã¼ã³ãå
¬å¹³ã«æ¯è¼ããããã«ãT5 ãã T10 ã®ãã¹ã¦ã®ãã¹ãã§Â git reset --hard origin/$branch
 ãå®è¡ãã¦ãã¾ããT5 ãã T8 ã§ã¯ããã®è¿½å ã¹ãããã¯å¤§ããªå½±é¿ã¯ããã¾ããããT9 㨠T10 ã§ã¯ãããã®ãã¦ã³ãã¼ããã³ã¹ãã«å«ã¾ãã¦ãããã¨ãä¿è¨¼ãã¾ãã
ä¸è¨ã®ãã¹ã¦ã®ã·ããªãªã«ããã¦ãä¸äººã®ã¦ã¼ã¶ã¼ããªãã¸ããªå
ã®ã©ã³ãã ãªä¸ã¤ã®ãã¡ã¤ã«ãç¹°ãè¿ãå¤æ´ããä»ã®ã¦ã¼ã¶ã¼ãã¯ãã¼ã³ãã¦ãã§ãããã¦ããã®ã¨åããã©ã³ãã«ããã·ã¥ããããã«è¨å®ãã¾ãããããã¯ãªãã¸ããªã®æé·ãã·ãã¥ã¬ã¼ããããã®ã§ãgit fetch
 ã³ãã³ãã¯å®éã«æ°ãããã¼ã¿ããã¦ã³ãã¼ããããã¨ã«ãªãã¾ãã
ãã¹ãçµæ
ããã§ã¯ãå®é¨çµæãè¦ã¦ã¿ã¾ãããã
git clone
 ã®ããã©ã¼ãã³ã¹
å®å ¨ãªæ°å¤ã¯ä¸ã®è¡¨ã«è¨è¼ãã¦ãã¾ãã
å½ç¶ã®ãã¨ãªãããã·ã£ãã¼ã¯ãã¼ã³ãã¯ã©ã¤ã¢ã³ãã«ã¨ã£ã¦æãé«éãªã¯ãã¼ã³ã§ããã次ãã§ããªã¼ã¬ã¹ã次ã«ãããã¬ã¹ã®ãã¼ã·ã£ã«ã¯ãã¼ã³ãããã¦æå¾ã«ãã«ã¯ãã¼ã³ã¨ç¶ãã¾ãããã®æ§è½ã¯ãã¯ãã¼ã³ãªã¯ã¨ã¹ããæºããããã«å¿ è¦ãªãã¼ã¿éã«æ¯ä¾ãã¾ãããã«ã¯ãã¼ã³ã«ã¯ãã¹ã¦ã®å°éå¯è½ãªãªãã¸ã§ã¯ããå¿ è¦ã§ããããããã¬ã¹ã¯ãã¼ã³ã«ã¯ãã¹ã¦ã®å°éå¯è½ãªã³ãããã¨ããªã¼ãå¿ è¦ã§ãããããªã¼ã¬ã¹ã¯ãã¼ã³ã«ã¯ãã¹ã¦ã®å°éå¯è½ãªã³ããããå¿ è¦ã§ãããã¨ãæãåºãã¦ãã ãããã·ã£ãã¼ã¯ãã¼ã³ã¯ããªãã¸ããªã®å±¥æ´ãæé·ãã¦ãã¯ãã¼ã³ãµã¤ãºã«å½±é¿ããªãå¯ä¸ã®ã¯ãã¼ã³ã¿ã¤ãã§ãã
ãããã®ã¯ãã¼ã³ã¿ã¤ãã®ããã©ã¼ãã³ã¹ã¸ã®å½±é¿ã¯ããªãã¸ããªã®ãµã¤ãºãç¹ã«ã³ãããæ°ã«æ¯ä¾ãã¦å¤§ãããªãã¾ããä¾ãã°ãtorvalds/linux
 ã®ã·ã£ãã¼ã¯ãã¼ã³ã¯ãã«ã¯ãã¼ã³ã® 4 åã®é度ã§ãããããªã¼ã¬ã¹ã¯ãã¼ã³ã¯ 2 åã®é度ããåºã¾ãããããããã¬ã¹ã¯ãã¼ã³ã¯ 1.5 åã®é度ããåºã¾ãããLinux ããã¸ã§ã¯ãã®éçºæåã§ã¯ãé常ã«å°ããªããããæ¨å¥¨ããã¦ãããããã¨ã¦ãå¹çããå§ç¸®ãããã¨ãã§ããç¹ã«æ³¨æãã¦ãã ãããä»ã®ã»ã¨ãã©ã®å¤ãã®ãããã大ããªããããæã¤ããã¸ã§ã¯ãã§ã¯ãããã©ã¼ãã³ã¹ã®å·®ã¯å¤§ãããªãã¨äºæ³ãã¦ãã¾ãã
ãµã¼ãã¼ã®ããã©ã¼ãã³ã¹ã«é¢ãã¦ã¯ãã¯ãã¼ã³ãããã® Git ã® CPU æéã¯ããããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³(T4)ãé«ããã¨ããããã¾ããghe-governor
 ã使ã£ã¦ããå°ã詳ããè¦ã¦ã¿ãã¨ãGit CPU æéãé«ããªã£ã¦ããã®ã¯ã主ã«ãã¼ã·ã£ã«ã¯ãã¼ã³ã®ã·ããªãª (T3 㨠T4) ã§Â pack-objects
 ã®å¦çãå¤ããªã£ã¦ããããã ã¨ãããã¾ããtorvalds/linux
 ãªãã¸ããªã§ã¯ãããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³(T3)ã§ã¯ããã«ã¯ãã¼ã³(T1)ã¨æ¯è¼ãã¦ãpack-objects
 ã«è²»ãã Git CPU æéã 4 åã«ãªãã¾ããä¸æ¹ãå°è¦æ¨¡ãªÂ jquery/jquery
 ãªãã¸ããªã§ã¯ããã«ã¯ãã¼ã³ããã¼ã·ã£ã«ã¯ãã¼ã³(T3 㨠T4) ã«æ¯ã¹ã¦ã¯ãã¼ã³ãããã® CPU æ¶è²»éãå¤ããªã£ã¦ãã¾ããä¸ã¤ã®ç°ãªããªãã¸ããªã®ã·ã£ãã¼ã¯ãã¼ã³ã¯ãã¯ãã¼ã³ãããã® Git CPU åã³ç· CPU ã®æ¶è²»éãæãå°ãªãã§ãã
ãã«ã¯ãã¼ã³ãããå¤ãã®ãã¼ã¿ãéã£ã¦ããã®ã§ããã°ããªããã¼ã·ã£ã«ã¯ãã¼ã³ã®æ¹ãããå¤ãã® CPU ãæ¶è²»ãã¦ããã®ã§ããããï¼Git ããã¹ã¦ã®å°éå¯è½ãªãªãã¸ã§ã¯ããã¯ã©ã¤ã¢ã³ãã«éä¿¡ããå ´åãã»ã¨ãã©ã®å ´åããã¼ã¿ãå±éãããå¤æããããããã¨ãªãããã£ã¹ã¯ä¸ã«ãããã¼ã¿ã転éãã¾ãããããããã¼ã·ã£ã«ã¯ãã¼ã³ãã·ã£ãã¼ã¯ãã¼ã³ã¯ãã¯ã©ã¤ã¢ã³ãã«éä¿¡ããããã«ããã®ãã¼ã¿ã®ãµãã»ãããæ½åºãã¦ããã±ã¼ã¸ããªããå¿ è¦ãããã¾ããç§ãã¡ã¯ããã¼ã·ã£ã«ã¯ãã¼ã³ã§ã®ãã® CPU ã³ã¹ããåæ¸ããæ¹æ³ã調æ»ãã¦ãã¾ãã
æ¬å½ã®Â 楽ãã¿ã¯ããªãã¸ããªãã¯ãã¼ã³ãã¦ã¦ã¼ã¶ã¼ãéçºãéå§ããã³ã¼ãããµã¼ãã¼ã«ããã·ã¥ããæã«å§ã¾ãã¾ãã次ã®ã»ã¯ã·ã§ã³ã§ã¯ãã·ããªãª T5 ãã T10 ã¾ã§ãåæãã¾ããããã§ã¯Â git fetch
 ã¨Â git reset --hard origin/$branch
 ã³ãã³ãã«æ³¨ç®ãã¾ãã
jquery/jquery
 ã®ã¯ãã¼ã³ããã©ã¼ãã³ã¹
ãã¹ãçªå· | 説æ | ã¯ãã¼ã³å¹³åå®è¡æé (ããªç§) | ã¯ãã¼ã³ãããã® git ã® CPU æ¶è²»æé |
---|---|---|---|
T1 | ãã«ã¯ãã¼ã³ | 2,000ms (æãé ã) | 450ms (æãå¤ã) |
T2 | ã·ã£ãã¼ã¯ãã¼ã³ | 300ms (T1 ãã 6 åé«é) | 15ms (T1 ãã 30 åå°ãªã) |
T3 | ããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ | 900ms (T1 ãã 2.5 åé«é) | 270ms (T1 ãã 1.7 åå°ãªã) |
T4 | ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ | 900ms (T1 ãã 2.5 åé«é) | 300ms (T1 ãã 1.5 åå°ãªã) |
apple/swift
 ã®ã¯ãã¼ã³ããã©ã¼ãã³ã¹
ãã¹ãçªå· | 説æ | ã¯ãã¼ã³å¹³åå®è¡æé (ç§) | ã¯ãã¼ã³ãããã® git ã® CPU æ¶è²»æé |
---|---|---|---|
T1 | ãã«ã¯ãã¼ã³ | 50s (æãé ã) | 8s (T4 ããã 2 åå°ãªã) |
T2 | ã·ã£ãã¼ã¯ãã¼ã³ | 8s (T1 ãã 6 åé«é) | 3s (T4 ããã 6 åå°ãªã) |
T3 | ããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ | 16s (T1 ãã 3 åé«é) | 13s (T4 ã¨åç) |
T4 | ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ | 22s (T1 ãã 2 åé«é) | 15s (æãå¤ã) |
torvalds/linux
 ã®ã¯ãã¼ã³ããã©ã¼ãã³ã¹
ãã¹ãçªå· | 説æ | ã¯ãã¼ã³å¹³åå®è¡æé (å) | ã¯ãã¼ã³ãããã® git ã® CPU æ¶è²»æé |
---|---|---|---|
T1 | ãã«ã¯ãã¼ã³ | 5m (æãé ã) | 60s (T4 ããã 2 åå°ãªã) |
T2 | ã·ã£ãã¼ã¯ãã¼ã³ | 1.2m (T1 ãã 4 åé«é) | 40s (T4 ããã 3.5 åå°ãªã) |
T3 | ããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ | 2.4m (T1 ãã 2 åé«é) | 120s (T4 ã¨åç) |
T4 | ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ | 3m (T1 ãã 1.5 åé«é) | 130s (æãå¤ã) |
git fetch
 ã®ããã©ã¼ãã³ã¹
å®å ¨ãªãã§ããæ§è½ã®æ°å¤ã¯ä¸ã®è¡¨ã«ã¾ã¨ãã¦ããã¾ãããæåã«æã ã®å®é¨çµæãã¾ã¨ãã¦ã¿ã¾ãããã
æ大ã®çºè¦ã¯ãã·ã£ãã¼ãã§ããã¯ææªã®é¸æè¢ã§ããã¨ãããã¨ã§ããããã¯ç¹ã«ãã«ã¯ãã¼ã³ã®å ´åã«é¡èã§ããã®æè¡çèæ¯ã¨ãã¦ã¯ãµã¼ãã¼ä¸ã®éè¦ãªããã©ã¼ãã³ã¹ã®æé©åãç¡å¹ã«ãããã·ã£ãã¼ãã¦ã³ããªã¼ãã®åå¨ãããã¾ããããã«ããããµã¼ãã¼ã¯ã¯ã©ã¤ã¢ã³ãããã¿ãæã«ä½ãå°éå¯è½ããè¦ã¤ããããã«ã³ããããããªã¼ã渡ãæ©ããã¨ã«ãªãã¾ãããã«ã¯ãã¼ã³ã®å ´åã¯ããå¤ãã®ã³ããããããªã¼ãã¯ã©ã¤ã¢ã³ãä¸ã«åå¨ããã®ã§ãéè¤ãé¿ããããã«ãµã¼ãã¼ãè¡ããã§ãã¯å¦çã«ã³ã¹ãããããã®ã§ããã¾ããããå¤ãã®ã·ã£ãã¼ã³ããããèç©ãããã¨ãã¯ã©ã¤ã¢ã³ãã¯ãããã®ã·ã£ãã¼ãã¦ã³ããªã¼ãä¼ããããã«ãããå¤ãã®ãã¼ã¿ããµã¼ãã¼ã«éä¿¡ããå¿ è¦ãããã¾ãã
äºã¤ã®ãã¼ã·ã£ã«ã¯ãã¼ã³ãªãã·ã§ã³ã¯ãgit fetch
 ã¨Â git reset --hard origin/$branch
 ã®æåãããããã§å¤§ããç°ãªãã¾ãããããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ããã®ãã§ããã¯Â reset
 ã³ãã³ãããããã«å¢å ãã¦ãã¾ãããã¦ã¼ã¶ã¼ã®è¦ç¹ããè¦ãã¨å¤§ããªéããåºãã»ã©ã§ã¯ããã¾ããã対ç
§çã«ãããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ãããã§ããããã¨æéã大å¹
ã«å¢ãã¾ããããã¯ããµã¼ãã¼ã git reset --hard origin/$branch
 ã³ãã³ããæºããããã«ãã³ãããã®ã«ã¼ãããªã¼ããå°éå¯è½ãªãã¹ã¦ã®ããªã¼ã¨ããããéä¿¡ããªããã°ãªããªãããã§ãã
ãªãã¸ããªã大ãããªãã«ã¤ãã¦ãã®ãããªä½åãªã³ã¹ããããããããã·ã£ãã¼ãã§ãããããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ããã®ãã§ããã¯ãå§ããã¾ãããããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ã®å¯ä¸ã®æ¨å¥¨ã·ããªãªã¯ãã³ãããå±¥æ´ã«ã¢ã¯ã»ã¹ããå¿ è¦ããããã«ããã·ã³ã§ç´ æ©ãã¯ãã¼ã³ãä½æãããã«ãå¾ããã«ãã®ãªãã¸ããªãåé¤ããã¨ãããã®ã§ãã
ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ã¯ãµã¼ãã¼ä¸ã® Git ã® CPU æ¶è²»ãå¤å°å¢å ããã¾ããããããã¯ã¼ã¯ãã¼ã¿ã®è»¢ééã¯ãã«ã¯ãã¼ã³ãã·ã£ãã¼ã¯ãã¼ã³ããã®ãã«ãã§ãããããã¯ããã«å°ãªãã¦æ¸ã¿ã¾ããç§ãã¡ããã¹ãã§ç¨ãããªãã¸ããªããã大ããªããããæã¤ãªãã¸ããªã®å ´åã¯ãä½å㪠CPU ã³ã¹ãã¯ããã»ã©éè¦ã§ã¯ãªãã§ããããããã«ãå ¨ã¦ã®ã³ãããå±¥æ´ã«ã¢ã¯ã»ã¹ã§ããã®ã§ããããã®ãªãã¸ããªãå©ç¨ããå®éã®ã¦ã¼ã¶ã¼ã«ã¨ã£ã¦ã¯ä¾¡å¤ã®é«ããã®ã«ãªãããããã¾ããã
ã¾ãããã¹ãä¸ã«çºè¦ããé©ãã¹ãçµæã注ç®ã«å¤ãã¾ããLinux ãªãã¸ããªã® T9 㨠T10 ã®ãã¹ãä¸ã«ãç§ãã¡ã®ãã¼ãã¸ã§ãã¬ã¼ã¿ã¼ã¯ã¡ã¢ãªã®åé¡ã«ééãã¾ãããããã¯ç§ãã¡ãå®è¡ãããããªè² è·ã®é«ãã·ããªãªã§ã¯ãããå¤ãã®èªåã¬ãã¼ã¸ã³ã¬ã¯ã·ã§ã³ï¼GCï¼ãå¼ãèµ·ãããããã§ããLinux ãªãã¸ããªã® GC ã¯ã³ã¹ããé«ãããã¹ã¦ã® Git ãã¼ã¿ãå®å
¨ã«ããã¯ããªãããªããã°ãªãã¾ãããç§ãã¡ã¯ Linux ã¯ã©ã¤ã¢ã³ãã§ãã¹ããã¦ããã®ã§ããã©ã¢ã°ã©ã¦ã³ãã³ãã³ãããããã¯ããªãããã«ãGC ããã»ã¹ã¯ããã¯ã°ã©ã¦ã³ãã§èµ·åããã¦ãã¾ããããããããã§ãããç¶ãã¦ãããã¡ã«ãããã¤ãã®ããã¯ã°ã©ã¦ã³ãããã»ã¹ãåæã«å®è¡ãããããã«ãªã£ã¦ãã¾ãã¾ãããããã¯ç¾å®çãªã·ããªãªã§ã¯ããã¾ããããç§ãã¡ã®äººå·¥çè² è·ãã¹ãã«å½±é¿ãä¸ãã¾ããããããã¹ãçµæã«å½±é¿ãä¸ããªãããã«ãgit config gc.auto false
 ãå®è¡ãã¾ããã
注ç®ãã¹ãã¯ããããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ã¯ãã«ã¯ãã¼ã³ãããé »ç¹ã«èªåã¬ãã¼ã¸ã³ã¬ã¯ã·ã§ã³ãå¼ãèµ·ããå¯è½æ§ãããã¨ãããã¨ã§ããããã¯ããã¼ã¿ãããå¤ãã®å°ããªãªã¯ã¨ã¹ãã«åå²ãããã¨ã«ããå½ç¶ã®å¯ç£ç©ã§ããç§ãã¡ã¯ãGit ã®ãªãã¸ããªã®ã¡ã³ããã³ã¹ãããæè»ã«ããããã®ä½æ¥ãé²ãã¦ãã¾ããç¹ã«ãå®å ¨ãªããã¯ã®ããªããã«æéããããããããããªå¤§è¦æ¨¡ãªãªãã¸ããªã§ã¯ããããã£ãä½æ¥ãå¿ è¦ã«ãªãã¾ãããã®æ©è½ã®ã¢ãããã¼ãã«ã¤ãã¦ã¯ãGitHub ããã°ã§ç´¹ä»ããäºå®ãªã®ã§ã楽ãã¿ã«ã
jquery/jquery
 ã®ãã§ããããã©ã¼ãã³ã¹
ãã¹ãçªå· | ã·ããªãª | ãã§ããå¹³åå®è¡æé | git reset –hard | ãã§ãããããã® git ã® CPU æ¶è²»æé |
---|---|---|---|---|
T5 | ãã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 200ms | 5ms | 4ms (æãå°ãªã) |
T6 | ãã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ã·ã£ãã¼ãã§ãã | 300ms | 5ms | 18ms (T5 ããã 4 åå¤ã) |
T7 | ã·ã£ãã¼ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 200ms | 5ms | 4ms (T5 ã¨åç) |
T8 | ã·ã£ãã¼ã¯ãã¼ã³ãªãã¸ããªã§ã®ã·ã£ãã¼ãã§ãã | 250ms | 5ms | 14ms (T5 ããã 3 åå¤ã) |
T9 | ããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 200ms | 85ms | 9ms (T5 ããã 2 åå¤ã) |
T10 | ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 200ms | 40ms | 6ms (T5 ããã 1.5 åå¤ã) |
apple/swift
 ã®ãã§ããããã©ã¼ãã³ã¹
ãã¹ãçªå· | ã·ããªãª | ãã§ããå¹³åå®è¡æé | git reset –hard | ãã§ãããããã® git ã® CPU æ¶è²»æé |
---|---|---|---|---|
T5 | ãã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 350ms | 80ms | 20ms (æãä½ã) |
T6 | ãã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ã·ã£ãã¼ãã§ãã | 1,500ms | 80ms | 300ms (T5 ããã 13 åå¤ã) |
T7 | ã·ã£ãã¼ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 300ms | 80ms | 20ms (T5 ã¨åç) |
T8 | ã·ã£ãã¼ã¯ãã¼ã³ãªãã¸ããªã§ã®ã·ã£ãã¼ãã§ãã | 350ms | 80ms | 45ms (T5 ããã 2 åå¤ã) |
T9 | ããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 300ms | 300ms | 70ms (T5 ããã 3 åå¤ã) |
T10 | ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 300ms | 150ms | 35ms (T5 ããã 1.5 åå¤ã) |
torvalds/linux
 ã®ãã§ããããã©ã¼ãã³ã¹
ãã¹ãçªå· | ã·ããªãª | ãã§ããå¹³åå®è¡æé | git reset –hard | ãã§ãããããã® git ã® CPU æ¶è²»æé |
---|---|---|---|---|
T5 | ãã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 350ms | 250ms | 40ms (æãä½ã) |
T6 | ãã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ã·ã£ãã¼ãã§ãã | 6,000ms | 250ms | 1,000ms (T5 ããã 25 åå¤ã) |
T7 | ã·ã£ãã¼ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 300ms | 250ms | 50ms (T5 ããã 1.3 åå¤ã) |
T8 | ã·ã£ãã¼ã¯ãã¼ã³ãªãã¸ããªã§ã®ã·ã£ãã¼ãã§ãã | 400ms | 250ms | 80ms (T5 ããã 2 åå¤ã) |
T9 | ããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 350ms | 1250ms | 400ms (T5 ããã 10 åå¤ã) |
T10 | ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ãªãã¸ããªã§ã®ãã«ãã§ãã | 300ms | 500ms | 140ms (T5 ããã 3.5 åå¤ã) |
ããã¯ä½ãæå³ããã®ã§ããããï¼
ç§ãã¡ã®å®é¨ã§ã¯ããããã®ç°ãªãã¯ãã¼ã³ãªãã·ã§ã³ã¨ãã§ãããªãã·ã§ã³ã®éã§ãããã¤ãã®ããã©ã¼ãã³ã¹ã®å¤åããããã¨ãå®è¨¼ããã¾ããã人ã«ãã£ã¦é©åãªä½¿ãæ¹ã¯ç°ãªãã¾ã! ç§ãã¡ã®å®é¨è² è·ã¯äººå·¥çãªãã®ã§ãããããªãã®ãªãã¸ããªã®æ§æã¯ãããã®ãªãã¸ããªã¨ã¯å¤§ããç°ãªãããããã¾ããã
ããã§ã¯ãèªåã®ä½¿ç¨æ³ã«é©ããã·ããªãªãé¸æããã®ã«å½¹ç«ã¤ã¨æãããå ±éã®ãã¼ããããã¤ãæãã¦ã¿ã¾ãï¼
åä¸ã®ãªãã¸ããªã®ã¿ã使ãéçºè
ã§ããã°ãæåã®ã¢ããã¼ãã¯ãã«ã¯ãã¼ã³ãä½æãã¦ããã常ã«ãã«ãã§ãããå®è¡ãããã¨ã§ããå¤ãã®å¤§ããªãããã®ããã§ãªãã¸ããªãµã¤ãºãé常ã«å¤§ããå ´åã¯ãããç´ æ©ã使ãå§ãããã¨ãã§ãããããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ã«ç§»è¡ãã¦ãè¯ãã§ãããããã¬ã¼ããªãã¯ãgit checkout
 ã git blame
 ã®ãããªã³ãã³ãã§ãå¿
è¦ã«å¿ãã¦æ°ããããããã¼ã¿ããã¦ã³ãã¼ãããã¨ããç¹ã§ãã
ä¸è¬çã«ãã·ã£ãã¼ãã§ããã®è¨ç®ã¯ãã«ãã§ããã«æ¯ã¹ã¦è¨ç®éãå¤ããªãã¾ãããã«ã¯ãã¼ã³ãªãã¸ããªã§ãã·ã£ãã¼ã¯ãã¼ã³ãªãã¸ããªã§ãã常ã«ã·ã£ãã¼ãã§ããã§ã¯ãªããã«ãã§ããã使ç¨ããããã«ãã¾ãããã
CI ãã«ãã®ãããªã¯ã¼ã¯ããã¼ã§ãã¯ãã¼ã³ãä½æãã¦ããã«ãªãã¸ããªãåé¤ããå¿
è¦ãããå ´åã¯ãã·ã£ãã¼ã¯ãã¼ã³ãè¯ããªãã·ã§ã³ã§ããã·ã£ãã¼ã¯ãã¼ã³ã¯ãææ°ã®ã³ãããã§ä½æ¥ãã£ã¬ã¯ããªã®ã³ãã¼ãåå¾ããæéã®æ¹æ³ã§ãããã«ãã®éã«ã³ãããã®å±¥æ´ãå¿
è¦ãªå ´åã¯ããã«ã¯ãã¼ã³ãããããªã¼ã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ã®æ¹ããã¾ãããããããã¾ãããtorvalds/linux
 ãªãã¸ããªã®ãããªå¤§ããªãªãã¸ããªã§ã¯ããã«ã¯ãã¼ã³ã¨æ¯ã¹ãã¨ã¯ã©ã¤ã¢ã³ãå´ã§ã¯æéãç¯ç´ã§ãã¾ãããGit ãµã¼ãã¼ã®è² æ
ãå°ã大ãããªããã¨ãè¦ãã¦ããã¾ãããã
ãããã¬ã¹ãã¼ã·ã£ã«ã¯ãã¼ã³ã¯ãGit ã® sparse-checkout æ©è½ã使ã£ã¦ä½æ¥ãã£ã¬ã¯ããªã®ãµã¤ãºãå°ããããå ´åã«ç¹ã«å¹æçã§ãããã®çµã¿åããã«ãããä½æ¥ã«å¿ è¦ãªãããã®æ°ãå¤§å¹ ã«æ¸ãããã¨ãã§ãã¾ããsparse-checkout ã§ã¯ãã·ã£ãã¼ã¯ãã¼ã³ã®ããã«å¿ è¦ãªãã¼ã¿è»¢éãæ¸ãããã¨ã¯ã§ãã¾ããã
ç¹çãã¹ãã¯ãtorvalds/linux
 ãªãã¸ããªãããããªã大ããªãªãã¸ããªã¯ä»åãã¹ããã¦ããªããã¨ã§ãããã®ãããªãªãã¸ããªã¯å
¬ã«ã¯è¦ããã¾ãããããã©ã¤ãã¼ããªãã¸ããªã§ã¯ã¾ãã¾ãä¸è¬çã«ãªã£ã¦ãã¦ãã¾ããããããªãã®ãªãã¸ããªãç§ãã¡ã®ãã¹ããªãã¸ããªã¨ã¯å¤§ããç°ãªãã¨æããããç§ãã¡ã®å®é¨ãèªåã§åç¾ãã¦ã¿ããã¨ããå§ããã¾ãã
ã覧ã®ããã«ãç§ãã¡ã®ãã¹ãããã»ã¹ã¯ãã¦ã¼ã¶ã¼ãç°ãªãã¯ã¼ã¯ããã¼ãæã¡ãç°ãªããã©ã³ãã§ä½æ¥ããã¨ããç¾å®ã®ç¶æ³ãã·ãã¥ã¬ã¼ããã¦ããããã§ã¯ããã¾ãããã¾ãããã®èª¿æ»ã§åæãã Git ã³ãã³ãã®ç¨®é¡ã¯å°ãªããã¦ã¼ã¶ã¼ãæ¥å¸¸ç㪠Git ã«ä½¿ç¨ããã³ãã³ãã表ãã¦ãã¾ãããç§ãã¡ã¯ããããã®ãªãã·ã§ã³ãã¦ã¼ã¶ã¼ã¨ã¯ã¹ããªã¨ã³ã¹ãã©ã®ããã«å¤åãããã®ããå ¨ä½åãææ¡ããããã«èª¿æ»ãç¶ãã¦ãã¾ãã
è¬è¾
ãã®èª¿æ»ã®ããã®åªåã¨ã¹ãã³ãµã¼ã·ããã«å°½åãã¦ãã ãã£ã Derrick Stolee ã¨å½ç¤¾ã®ãããã§ãã·ã§ãã«ãµã¼ãã¹ãã¼ã ã«æè¬ã®æã表ãã¾ãã