ä»æ¥ã¯ãäžçäžã®èšå€§ãªæ°ã®ãŠãŒã¶ãŒãæ±ããBadooã§ãããã©ã®ããã«çºçãããã«ã€ããŠã話ããŸãã
A / Bãã¬ãŒã ã¯ãŒã¯ãäž»å°ããåå²ãã¹ãçšã®ããŒã«ã®å šäœçãªãåç©åããããããã®äžéšã¯ä»ã®ç®çã®ããã«éçºãããŸããã ãã®ä»ã®æ¬ ç¹ã®äžã§ãããããã®ããŒã«ã¯ãã¹ãŠããŠãŒã¶ãŒããªãã·ã§ã³ã«åå²ããããã«ã»ãŒåãæ¹æ³ã䜿çšããŸãããããã¯ããŠãŒã¶ãŒIDãšãå¡©ãã®ããã·ã¥ã§ãã ãã®ã¢ãããŒãã¯ç§ãã¡ãæºè¶³ããããã®ã§ã¯ãªããå€ãããŒãžã§ã³ã®æ¬ ç¹ãåé¿ã§ããæ°ããããŒãžã§ã³ãéçºããããšã決å®ãããŸããã
åå²ãã¹ãããŒã«ã®æ°ããããŒãžã§ã³ã®äž»ãªèŠä»¶ã¯æ¬¡ã®ãšããã§ãã
- 倧èŠæš¡ãªãããžã§ã¯ããšå€§èŠæš¡ãªããŒã ããããããåæã«å€ãã®ãã¹ããå®æœããå¿ èŠããããŸãã
- åæã«å®è¡ããããã¹ãã¯ããŠãŒã¶ãŒãšã®äº€å·®ãæå°éã§ããå¿ èŠããããä»ã®ãã¹ããšã®äº€å·®ãããå Žåã¯ãããã«é¢ããæ å ±ããããŒãžã£ãŒã«è¡šç€ºãããå¿ èŠããããŸãã
- ãã¹ããäœæãããšãããã¹ãã®åããŒãžã§ã³ã«äœäººã®äººãå ¥ãããç解ããããšæããŸãã
- åæäžã«ããã¹ãã®KPIã€ã³ãžã±ãŒã¿ãŒãçªç¶ãžã£ã³ãããçç±ãçåã«ãªããªãããã«ããã¹ãæ¡ä»¶ã®å€æŽãã¬ããŒãã«è¡šç€ºããå¿ èŠããããŸãã
- éçºè åãã®ãœãããŠã§ã¢APIã¯ã·ã³ãã«ã§ããšã©ãŒã®å¯èœæ§ãæžããå¿ èŠããããŸãã
- éçºè ãå·»ã蟌ãŸãã«ãã¹ãæ¡ä»¶ãå€æŽããæ©èœãå¿ èŠã§ãã
- QAã«ã¯ããŠãŒã¶ãŒããã¹ãæ¡ä»¶ã«è©²åœãããã©ããã«é¢ä¿ãªãããŠãŒã¶ãŒã«ãªãã·ã§ã³ãæå®ã§ãã䟿å©ãªããŒã«ãå¿ èŠã§ãã
- ãŠãŒã¶ãŒããã¹ãã«åå ããŠãããã©ããã確èªããã®ã¯ãããŒãžã®åŸ©åž°æéã«åœ±é¿ãäžããªãããã«ååã«é«éã§ãªããã°ãªããŸããã
- ããã¯æéã®çµéãšãšãã«ãã¹ãã®äº€å·®ç¹ã®è©äŸ¡ãéåžžã«è€éã«ããã³ãŒãã«ãšã³ããããŒãå°å ¥ããããããã¹ãã¯ç¡éã§ãã£ãŠã¯ãªããŸããã
ãããã®èŠä»¶ã«åºã¥ããŠãBIããŒã ã®æšå¥šäºé ãèæ ®ã«å ¥ããŠãæ°ããããŒã«ã«ã¯ä»¥äžãç»å ŽããŸããã
- ãã£ã«ã¿ãŒã®åœ¢åŒã§ãã¹ãã«å ¥ãããã®æ¡ä»¶ãæå®ããæ©èœã
- å¿ é ãã£ãŒã«ãã«ãã¹ãã®éå§æ¥ãšçµäºæ¥ã瀺ãæ©èœã
- ãã¹ãã®ãªãã·ã§ã³ãšãªãã·ã§ã³ã®å²åãæå®ããæ©èœã
- ä¿åãããšãã«ããã¹ãããªã¢ã³ãã«ã¢ã¯ã»ã¹ãããŠãŒã¶ãŒã®è©äŸ¡ãããã³ä»ã®ãã¹ããšã®äº€å·®ïŒããŒã»ã³ããŒãžã§ïŒãèšç®ãããŸãã
- ãã¹ããå€æŽããããã³ã«ãããã°ããã¹ãèšå®ã®ã°ã«ãŒããäœæãããŸããããã«ã¯ããã£ã«ã¿ãŒããã¹ãã®éå§æ¥ãšçµäºæ¥ããªãã·ã§ã³ãå«ãŸããŸããããã«ãããBIã¬ããŒãã§ãã¹ãã¬ããŒãã衚瀺ããã°ã©ãã§ãžã£ã³ãããçç±ãç解ã§ããŸãã
- ãã®å Žã§ãŠãŒã¶ãŒæ°ãæšå®ããŸãã ãã¹ãŠã®ãŠãŒã¶ãŒã¯åå²ã°ã«ãŒãã«åå²ããããªãã·ã§ã³ã«ãããŠãŒã¶ãŒã®ååžã¯ãªãã·ã§ã³ã«ããåå²ã°ã«ãŒãã®ååžã«çž®å°ãããŸããã
A / Bãã¬ãŒã ã¯ãŒã¯ã®æ°ããããŒãžã§ã³ã¯ã UserSplit ToolãŸãã¯åã«UserSplitãšåŒã°ããŠããŸãã ã éçºã¯åŸã ã«é²ã¿ãŸããã æåã¯ãããŒã«ãããã«äœ¿çšã§ããããã«ãå¯èœãªéãæå°ã®æ©èœãäœæãããŸããã ãããŠãæ°ããæ©èœãè¿œå ããããã°ãä¿®æ£ãããŸããã
ããã§ãçŸåšã®æç¹ã§UserSplitããã詳现ã«èª¿ã¹ããªããããè¡ãå¿ èŠãããã®ãââãç解ããããšãææ¡ããŸãã
ãã¹ãã®äž»ãªç¹æ§
ãã®ããŒãžã¯æ¬¡ã®ãšããã§ãã
ããã§ã¯ãäž»ã«æ å ±ãã£ãŒã«ãã§ãããã ãã ã㌠ã Jira issue ã ãã¹ããããŒãžã£ãŒ ãããã³Hipchatã«ãŒã ã®äœæãã¿ã³ã¯é€ããŸãã
Keyãã£ãŒã«ãã¯ããã¹ããäžæã«èå¥ããæå³ã®ããæååã§ãã éçºè ã®ãœãããŠã§ã¢APIã¯ããã¹ãIDã§ã¯ãªãããŒã䜿çšããŸãã ããèªã¿ãããããã¹ãIDã«çµã³ä»ããããªãããã«ããããšãã§ããŸãã
ä»ã®ãã£ãŒã«ãã®èª¬æ
Jira課é¡ãã£ãŒã«ãã§ã¯ãJiraã¿ã¹ã¯çªå·ã瀺ããŸãã ãã¹ããè¡ââãããã¿ã¹ã¯ãèŠã€ããããããããã«äœ¿çšãããŸãã ãŸããéç¥ä»ãã®èªåã³ã¡ã³ãããã®ã¿ã¹ã¯ã«éä¿¡ãããŸãã
ãã£ãŒã«ãã«ããã¹ããããŒãžã£ãŒã¯ããã¹ããç·šéããããã®ã¢ã¯ã»ã¹æš©ããã人ã瀺ããŸãã 圌ãã¯Hipchatã§éç¥ãåãåããŸãã ååãšããŠããã¹ãã®äœæè ãšJiraã¿ã¹ã¯ã®ãŠã©ããã£ãŒãããã«ããŸãã
[ãããã£ããã«ãŒã ã®äœæ]ãã¿ã³ãã¯ãªãã¯ãããšãã¡ãã»ã³ãžã£ãŒã«ã«ãŒã ãäœæãããããã«ãã¹ãŠã®ãã¹ããããŒãžã£ãŒãè¿œå ãããŸãã ãã®éšå±ã«ã¯éç¥ãå±ããŸãããŸããããã§ãã¹ãã®è©³çŽ°ã«ã€ããŠè©±ãåãããšãã§ããŸãã UserSplitã€ã³ã¿ãŒãã§ãŒã¹ããä»ã®ãŠãŒã¶ãŒãçŽæ¥ã«ãŒã ã«è¿œå ããããšãã§ããŸãã
çŸåšããããã®2ã€ããããŸãã
å°æ¥çã«ã¯ããã¹ãã®å·®ãè¿«ã£ãçµäºã«é¢ããéç¥ãããã³å Žåã«ãã£ãŠã¯ä»ã®éç¥ãè¡ãäºå®ã§ãã
ãã£ãŒã«ãã«ããã¹ããããŒãžã£ãŒã¯ããã¹ããç·šéããããã®ã¢ã¯ã»ã¹æš©ããã人ã瀺ããŸãã 圌ãã¯Hipchatã§éç¥ãåãåããŸãã ååãšããŠããã¹ãã®äœæè ãšJiraã¿ã¹ã¯ã®ãŠã©ããã£ãŒãããã«ããŸãã
[ãããã£ããã«ãŒã ã®äœæ]ãã¿ã³ãã¯ãªãã¯ãããšãã¡ãã»ã³ãžã£ãŒã«ã«ãŒã ãäœæãããããã«ãã¹ãŠã®ãã¹ããããŒãžã£ãŒãè¿œå ãããŸãã ãã®éšå±ã«ã¯éç¥ãå±ããŸãããŸããããã§ãã¹ãã®è©³çŽ°ã«ã€ããŠè©±ãåãããšãã§ããŸãã UserSplitã€ã³ã¿ãŒãã§ãŒã¹ããä»ã®ãŠãŒã¶ãŒãçŽæ¥ã«ãŒã ã«è¿œå ããããšãã§ããŸãã
éç¥
çŸåšããããã®2ã€ããããŸãã
- å·®ãè¿«ã£ããã¹ãã®éå§ã®éç¥ïŒéå§æ¥ãè¿ã¥ããŠããŸãïŒ;
- ãã¹ãçšã®ã³ãŒãããæŠéçšãã«ã¬ã€ã¢ãŠãããããã¹ããå®è¡ã§ããããšãéç¥ããŸãã
å°æ¥çã«ã¯ããã¹ãã®å·®ãè¿«ã£ãçµäºã«é¢ããéç¥ãããã³å Žåã«ãã£ãŠã¯ä»ã®éç¥ãè¡ãäºå®ã§ãã
è©Šéšæ¡ä»¶ãšãªãã·ã§ã³
ãã®ããŒãžã§ã¯ããã¹ãã®æ¥ä»ç¯å²ïŒã¢ã¯ãã£ããªå ŽåïŒããã¹ãã«åå ããããã®æ¡ä»¶ïŒåœããã·ã¢ãªã©ïŒãããã³ãªãã·ã§ã³ãæå®ã§ããŸãã åãªãã·ã§ã³ã«ã€ããŠãããã«å«ãŸãããŠãŒã¶ãŒã®ååãšå²åã瀺ãããŸãã ãã®ååã¯ããŠãŒã¶ãŒãååŸãããã¹ãã®ããŒãžã§ã³ãç解ããããã«ãéçºè ãïŒããªã¢ã³ãIDã§ã¯ãªãïŒäœ¿çšããŸãã ããã¯ãã¹ãåºæã®ãã®ã§ãã ã³ã³ãããŒã«ã®ãªãã·ã§ã³èªäœã¯ååšããªãå ŽåããããŸãããã³ã³ãããŒã«ã®1ã€ã®ã¿ãã³ã³ãããŒã«ã«ãªããŸãã
ãã®ããŒãžã«ãããã¹ãŠ-æ¥ä»ã®ç¯å²ããã¹ãæ¡ä»¶ããªãã·ã§ã³-ã¯ãåè¿°ã®ãã¹ãèšå®ã®ã°ã«ãŒããè¡šããŸãã ãã®ãããªèšå®ã°ã«ãŒãã¯è€æ°ååšã§ããŸãããäžåºŠã«ãã¹ãã«çŽæ¥æ¥ç¶ã§ããã°ã«ãŒãã¯1ã€ã ãã§ãããããçŸåšã®èšå®ã°ã«ãŒãã§ãã ãã¹ãèšå®ã®ã°ã«ãŒããå€æŽããããã³ã«ãå®éã«ã¯å€æŽãããŸããããæ°ããèšå®ãäœæãããŸãã ãã ããããã«ãã¹ãã«ã¢ã¿ãããããã®ã§ã¯ãªããæºåãæŽã£ãåŸã«ã®ã¿ã¢ã¿ãããããŸãã èšå®ã®ã°ã«ãŒããæºåããã«ã¯ããªãã·ã§ã³ã«ã©ã³ãã ãªåå²ã°ã«ãŒããå²ãåœãŠããã¹ãã¹ã³ã¢ãšä»ã®ãã¹ããšã®äº€ç¹ãèšç®ããå¿ èŠããããŸãã
ãªãã·ã§ã³
è¯ãæ¹æ³ã§ã¯ãã©ã®ãã¹ãã«ãå°ãªããšã2ã€ã®æ¯èŒãªãã·ã§ã³ãå¿ èŠã§ãã ããã«ãã»ãšãã©ã®ãã¹ãã§ã¯ãäœãèµ·ãã£ãã®ããæ¯èŒãããšãã«ãã³ã³ãããŒã«ããŒãžã§ã³ã䜿çšãããŸãã ãã ããæ°ãããæ©èœããèµ·åããã2ã€ã®èšèšãªãã·ã§ã³ãããå Žåãå¶åŸ¡ãªãã·ã§ã³ã¯ãããŸããã ããããŸã£ãããªãåã«ãããã§æ¯èŒãããã®ã¯äœããããŸããã çŸåšãå¶åŸ¡ãªãã·ã§ã³ã¯åé€ã§ããŸããããäžèŠãªå Žåã¯0ïŒ ãèšå®ã§ããŸãã å°æ¥ãã€ã³ã¿ãŒãã§ãŒã¹ã¯å°ãå€æŽãããäºå®ã§ãããçŸåšã®ãšããå€æŽãããŠããŸãã
ã³ã³ãããŒã«ã±ãŒã¹ã§ã¯ããã¹ããéã¢ã¯ãã£ãã®å Žåãšå€ãããªãããã«ãè¿œå ã®ããžãã¯ïŒãããã®ãã°èšé²ãé€ãïŒããªãããšãéèŠã§ãã ããã§ãªãå Žåãããã¯å¶åŸ¡ãªãã·ã§ã³ã§ã¯ãªãããã¹ãæžã¿ã®ãªãã·ã§ã³ã®1ã€ã§ããããšãããããŸãã
ãŠãŒã¶ãŒã°ã«ãŒãã®åå²
èŠä»¶ã«åºã¥ããŠããŠãŒã¶ãŒIDãšãœã«ãã®ããã·ã¥ã®äœ¿çšã¯ããŠãŒã¶ãŒã®åå²ã«ã¯é©ããŠããŸããã ãªãã·ã§ã³ã®ãŠãŒã¶ãŒã®ãããããã°ããè©äŸ¡ããããšã¯ã§ããŸããïŒãªã³ã¶ãã©ã€ã§ã¯ãããŒã¿ããŒã¹ã¯ãœã«ãã䜿çšããŠããã·ã¥ãããªããã£ããèšç®ããŸãããã¹ãããšã«ãç°ãªããœã«ããæã€ãã¹ãŠã®ãŠãŒã¶ãŒã®ããã·ã¥ãåèšç®ããã®ã¯æããã«ããªãé«äŸ¡ãªæäœã§ãïŒã ãŸããããã·ã¥ã䜿çšãããšããã¹ãéã§å¯èœãªéãå€ãã®ãŠãŒã¶ãŒã®ãé亀差ããå®çŸã§ããŸããã
代ããã«ãåå²ã°ã«ãŒãïŒsplit_groupïŒã䜿çšããããšã«ããŸããã ããã¯ã1ã2400ã®ç¯å²ã®æ°ãããŠãŒã¶ãŒïŒç»é²äžïŒãšæ¢åã®åå²ã°ã«ãŒããã©ã³ãã ã«æäŸãããšããèãæ¹ã§ãã
2400ã¯ã5ïŒ å»ã¿ã§ç°¡åã«åå²ã§ãããšããç¹ã§äŸ¿å©ã§ãã 5ïŒ ããšã«120ã®ã°ã«ãŒãã該åœããŸãã ãããŠããããã®120ã®ã°ã«ãŒãã¯ãæ®ããªãã§2ã3ã4ã5ã6ã8ã10ã12ã®ãªãã·ã§ã³ã«åå²ãããŸãã 7ã9ã11ã®ãªãã·ã§ã³-éåžžã«ãŸããªã±ãŒã¹ã§ãããç§ãã¡ã¯äŒããŸããã§ãããããããçºçããå Žåã¯ã2çªç®ã®å¶åŸ¡ãªãã·ã§ã³ãè¿œå ããçµ±èšã§èæ ®ããªãããšãã§ããŸãã
ã²ã¹ãïŒèš±å¯ãããŠããªãïŒãŠãŒã¶ãŒã®å ŽåãWebäžã®åå²ã°ã«ãŒãã¯Cookieã«å ¥ãããããã°ã€ã³åŸã«ãŠãŒã¶ãŒåå²ã°ã«ãŒããšäžèŽããªãå ŽåããããŸãã ããã¯ãæåŸã«ãã°ã€ã³ãããŠãŒã¶ãŒãã©ã®åå²ã°ã«ãŒããæã£ãŠãããã«é¢ä¿ãªããåããã©ãŠã¶ãŒã§ã²ã¹ããŠãŒã¶ãŒãåãããŒãžã§ã³ã®ãµã€ãïŒæ¿èªãã©ãŒã ãç»é²ãã©ãŒã ãªã©ïŒãèŠãããã«ç¹ã«è¡ãããŸãã ããããçŸåšãã²ã¹ããŠãŒã¶ãŒã«é¢ããæ å ±ã¯BIã«ã¢ããããŒããããŠããªãããããã®ãããªãã¹ããå®è¡ãããšãã®çµ±èšã¯å®å šã§ã¯ãããŸããã çŸåšããã®ããŒãã®æçµæ®µéã«ãããŸãã
ãã¹ãã®ãªãã·ã§ã³ãè¿œå ããå Žåããªãã·ã§ã³ã¯ïŒå²åã«å¿ããŠïŒåå²ã°ã«ãŒãã«ã©ã³ãã ã«å²ãåœãŠãããŸãã ã€ãŸã ãªãã·ã§ã³ããŠãŒã¶ãŒã®10ïŒ çšã«äºçŽãããŠããå Žåã240ã®ã©ã³ãã ãªåå²ã°ã«ãŒããããã«å¯Ÿå¿ããŸãã éçºããã»ã¹äžã«ããŠãŒã¶ãŒãçããã°ã«ãŒãã«åå²ããæ©èœãèªèããŠããŸããã§ããããåãªãã·ã§ã³ã®ããŒã»ã³ãã瀺ããŸãããã1ã€ã®ãªãã·ã§ã³ãããŒã»ã³ããå€æŽãããšãä»ã®ãã¹ãŠã®ãŠãŒã¶ãŒã«å¯ŸããŠãå€åããŸãã ããããåŸã§ãã¹ãå šäœã®ããŒã»ã³ããŒãžã®æ°ã瀺ãããšãã§ããããã«ãããã®ããŒã»ã³ããŒãžã«å¯Ÿå¿ããåå²ã°ã«ãŒãããªãã·ã§ã³éã§åçã«åå²ãããããã«ããŸãã
ãã¹ãã¹ã³ã¢
è©äŸ¡ã«ã¯ãExasolããŒã¿ããŒã¹ïŒååã®wildraidãæè¿æžããèšäº ïŒã䜿çšããŠããããããã¹ããšèšå®ã°ã«ãŒãïŒãã¹ãããªã¢ã³ããšãã®ã¹ããªããã°ã«ãŒããå«ãïŒã«é¢ããæ å ±ãã¢ããããŒããããŸãã
å®éãåå²ã°ã«ãŒãã¯ãŸã£ããã©ã³ãã ã«çºè¡ãããããã§ã¯ãããŸããã çŸåšã®æ¥ä»ãšäº€å·®ããïŒãã ããåå²ã°ã«ãŒãã®100ïŒ ãå æããªãïŒãã¹ãŠã®ãã¹ããããŒã¿ããŒã¹ããæœåºãããŸãã 次ã«ããããã®ãã¹ãã§ã¯ããã£ã«ã¿ãŒæ¡ä»¶ïŒåå²ã°ã«ãŒããé€ãïŒã«åºã¥ããŠãExasolããŒã¿ããŒã¹ãä»ããŠãã§ãã¯ãè¡ããããã¹ããšçŸåšã®ãã¹ãã®éã«å®éã®äº€å·®ããããã©ããã確èªãããŸãã å®éã«éè€ãããã¹ãã®ãã¡ãå¿ããåå²ã°ã«ãŒãã䜿çšãããŸãã ãããã£ãŠãçŸåšã®ãã¹ãã«åå²ã°ã«ãŒããå²ãåœãŠãå Žåãæåã®éžæè¢ã¯ç¡æã®åå²ã°ã«ãŒãã§ãããååãªç©ºãã°ã«ãŒãããªãå Žåã«ã®ã¿äœ¿çšäžã®åå²ã°ã«ãŒãã«ãªããŸãã ããã«ãéžæããã°ã«ãŒãããªãã·ã§ã³ã«ã©ã³ãã ã«å²ãåœãŠãããŸãã ããã«ããããªãã·ã§ã³éã§å¯Ÿè±¡è ã®åäžæ§ãç¶æããªããããã¹ãéã§å¯èœãªéãæå°ã®äº€å·®ãå®çŸã§ããŸãã
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
---|---|---|---|---|---|---|---|---|---|---|
Test1 | A | B | B | A | ||||||
Test2 | A | B | A | A | B | B | ||||
- | - | - | + | - | - | + | - | - | - | |
ãã¹ã | A | B | B | A |
ããªã¢ã³ãã«åå²ã°ã«ãŒããçºè¡ãããåŸãä»ã®ãã¹ããšã®äº€å·®ç¹ïŒãŠãŒã¶ãŒã®äœããŒã»ã³ããã©ã®ãã¹ããšäº€å·®ãããïŒãã«ãŠã³ããããŸãã
次ã«ããã¹ãèªäœãè©äŸ¡ããŸããã©ã®ãªãã·ã§ã³ã«äœäººã®ãŠãŒã¶ãŒãå«ãŸããŠãããããŠãŒã¶ãŒã«ãšã£ãŠæ£ç¢ºã§ãã ãããã®æ°å€ã䜿çšãããšã çµ±èšçã«ææãªçµæãåŸãããã«ãããã®æ¡ä»¶ã§ãã¹ããå®æœãã䟡å€ããããã©ãããããã³äº€å·®ãã¹ããçµæãæªããå¯èœæ§ããããã©ãããç解ã§ããŸãã
ãã¹ãã¹ã³ã¢ãšä»ã®ãã¹ããšã®äº€ç¹ãèšç®ããçµæã¯æ¬¡ã®ãšããã§ãã
*ãã¹ãŠã®æ°åã¯æ¶ç©ºã®ãã®ã§ãããçŸå®ãšã®ã€ãªããã¯ã©ã³ãã ã§ãã
åãã¿ã€ãã®èµ€ããã¹ããç®ç«ã¡ãŸãã ããšãã°ãã¢ãã€ã«ãã¹ããWebäžã®ãã¹ãã«åœ±é¿ãäžããå¯èœæ§ã¯äœããããããã¯èª¬æã®ããã«è¡ãããŸãã
亀差ç¹ã®ã«ãŠã³ãã®æåã®å®è£ ã¯ããã»ã©é«éã§ã¯ãªããæåã«èšç®ãæ°ç§ã§å®è¡ãããå Žåãåæã«å®è¡ããããã¹ãã®æ°ãå¢å ãããšã30åã«éãå§ããããšã«æ³šæãã䟡å€ããããŸãã ããã€ãã®æé©åãè¡ãããçŸåšã亀差ç¹ã®ã«ãŠã³ãã«ã¯1ååãããããããå®å šãªäº€å·®ç¹ã®ã«ãŠã³ããšè©äŸ¡ã¯æ倧2åã§ãã
è©Šéšæ¡ä»¶
UserSplitã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšãããšãããçšåºŠã®æè»æ§ãåãããã¹ãæ¡ä»¶ãæå®ã§ããŸãã ANDããã³ORæŒç®åã䜿çšã§ããŸããæ¡ä»¶ãæ¬åŒ§ã§å²ãããšãã§ããŸãã ãã¹ãŠã®ãã¹ããŠãŒã¶ãŒãšãã·ã¢ã®æ°ãããŠãŒã¶ãŒããã¹ããå©çšã§ããããã«ããããšããŸãã 次ã«ã次ã®ãããªãã£ã«ã¿ãŒãäœæã§ããŸãã
æ¡ä»¶ã®å
éšé
眮ãšåŠç
ã¹ã¯ãªãŒã³ã·ã§ããã«ç€ºãããŠããæ¡ä»¶ã¯ãJSON圢åŒã«å€æãããŸãã
æé©åã®ããã«ããã¹ãŠã®æ¡ä»¶ãåŠçããããã§ã¯ãããŸããã äŸïŒ
ïŒA AND BïŒãŸãã¯C
Aãåœã®å Žåãæ¡ä»¶Bã¯åŠçããããåŠçã¯ããã«æ¡ä»¶Cã«é²ã¿ãŸãã
AãšBãçã®å Žåãæ¡ä»¶Cã¯åŠçããããæçµå€ã¯çã«ãªããŸãã ãŠãŒã¶ãŒã¯ãã£ã«ã¿ãŒæ¡ä»¶ã®å¯Ÿè±¡ãšãªããŸãã
[ { "filter":"is_test_user", "operator":"eq", "value":"Yes" }, "OR", [ { "filter":"country_id", "operator":"in", "value":["50"] }, "AND", { "filter":"is_new_user", "operator":"eq", "value":"1" } ] ]
æé©åã®ããã«ããã¹ãŠã®æ¡ä»¶ãåŠçããããã§ã¯ãããŸããã äŸïŒ
ïŒA AND BïŒãŸãã¯C
Aãåœã®å Žåãæ¡ä»¶Bã¯åŠçããããåŠçã¯ããã«æ¡ä»¶Cã«é²ã¿ãŸãã
AãšBãçã®å Žåãæ¡ä»¶Cã¯åŠçããããæçµå€ã¯çã«ãªããŸãã ãŠãŒã¶ãŒã¯ãã£ã«ã¿ãŒæ¡ä»¶ã®å¯Ÿè±¡ãšãªããŸãã
ã€ã³ã¿ãŒãã§ãŒã¹ã§äœ¿çšå¯èœãªãã¹ãŠã®ãã£ã«ã¿ãŒã¯ãç°¡åã«æ¡ä»¶ã確èªã§ããŸãã ãããã®ãã£ã«ã¿ãŒã®ãã¹ãŠã®ããŒã¿ã¯ãååãšããŠããã§ã«ã¡ã¢ãªå ã«ãããŸãã ããã§ãªãå Žåã¯ãç°¡åã«ããŠã³ããŒãã§ããŸãã
ãŠãŒã¶ãŒãã©ã®ããã«ãã©ãããæ¥ããã瀺ãç°å¢ãã£ã«ã¿ãŒããããŸãã ããšãã°ãããã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ãããŠãŒã¶ãŒãçŸåšããåœïŒãŠãŒã¶ãŒããããã¡ã€ã«ã«æã£ãŠããåœãšæ··åããªãã§ãã ããïŒãããã³ãŠãŒã¶ãŒã®ãã©ãããã©ãŒã ïŒWebãiOSãAndroidãªã©ïŒã§ãã ã²ã¹ããŠãŒã¶ãŒã®å Žåãç°å¢ãã£ã«ã¿ãŒã®ã¿ã䜿çšå¯èœã§ãã
è©Šéšæ¡ä»¶ãå€æŽãã
åæã«å€ãã®ãã¹ããå®æœãããã®ã§ããããã¹ãŠã®åœã§ãã¹ããäžåºŠã«å®è¡ãããšããã¹ãã¯éè€ããå Žåã«ãã£ãŠã¯çžäºã«åœ±é¿ãåãŒããŸãã ãããåé¿ããã«ã¯ãããŸããŸãªåœã§ãã¹ããå®è¡ã§ããŸãã ãã®å Žåãå¥ã®åé¡ãçºçããå¯èœæ§ããããŸãããã¹ãã¯ãããåœã§ã¯ããŸããããä»ã®åœã§ã¯ã²ã©ãèŠããããšããããŸãã ãããåé¿ããã«ã¯ãåœãè¿œå ããŠãã¹ãæ¡ä»¶ãå€æŽããŸãã ãããã£ãŠãããä¿¡é Œæ§ã®é«ãçµæãååŸããæ£ããå€æãäžãããšãã§ããŸãã åã«è¿°ã¹ãããã«ããã¹ãã¬ããŒãã調ã¹ããšãã«ãã¹ãã«å¯Ÿãããã®ãããªå€æŽã誀解ãæããªãããã«ãã¬ããŒãã«ã¯ãã¹ãã®ããã€ãã®ããŒãžã§ã³ã®ããŒã¿ã衚瀺ãããŸãã
QAããŒã«
åé¡ã®åå ãéçºããã¹ããããã³çºèŠããããã«ãQAããŒã«ãäœæãããŸããã
QAããŒã«ã®èª¬æ
ãŠãŒã¶ãŒããã¹ãæ¡ä»¶ã«åœãŠãããšã¯éåžžã«é£ããå ŽåããããŸãã ç¹ã«å°æ°ã®ãŠãŒã¶ãŒããã¹ãã«äœ¿çšãããå Žåãåå²ã°ã«ãŒãã§ã¯ããã«å°é£ã«ãªãå¯èœæ§ããããŸãã ãŸããéçºè
ãã³ãŒãããããã¯ãããŠç®çã®ãã¹ããªãã·ã§ã³ã確èªã§ããå ŽåãQAã¹ãã·ã£ãªã¹ãã¯ãããçŠããããŸãã ãããã£ãŠãéçºè
ãQAã¹ãã·ã£ãªã¹ããããã³QAã¹ãã·ã£ãªã¹ãåãã«ãããããQAããŒã«ãäœæãããŸããã
QAããŒã«ã¯2ã€ã®ããŒã«ã§æ§æãããŠããŸãã
ãŠãŒã¶ãŒããŠãŒã¶ãŒIDãŸãã¯device_idã§ããªã¢ã³ãã«è¿œå ã§ããŸãïŒã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ã䜿çšããã²ã¹ããŠãŒã¶ãŒã«ãšã£ãŠäŸ¿å©ã§ãïŒã åæã«ãå®çšŒåç°å¢ãŸãã¯éçºç°å¢ïŒcheckmark develïŒããããããè¡ãå¿ èŠããããŠãŒã¶ãŒIDãæå®ã§ããŸãã
ãã¹ãããªã¢ã³ããååŸããããã«ãŠãŒã¶ãŒããã§ãã¯ãããšãã¯ãå¿ èŠã«å¿ããŠããŠãŒã¶ãŒIDãŸãã¯device_idãããã³ç°å¢ãã£ã«ã¿ãŒã®å€ãæå®ããå¿ èŠããããŸãã [ãã§ãã¯]ãã¿ã³ãã¯ãªãã¯ãããšããŠãŒã¶ãŒãè¡ã£ããã¹ãã®ããŒãžã§ã³ããŸãã¯ãŠãŒã¶ãŒãèœã¡ãªãã£ãçç±ïŒåå²ã°ã«ãŒããé©åããªãã£ããæ¡ä»¶ãæºãããªãã£ããªã©ïŒã衚瀺ãããŸãã
èªåãã¹ããå®æœããå ŽåãååãšããŠãã©ã³ãã ãªãŠãŒã¶ãŒãããŒã«ããååŸãããŸãã ãŠãŒã¶ãŒããšã«åå²ãã¹ãã®ãªãã·ã§ã³ãç°ãªãããšãå€æããŠãããããèªåãã¹ããæ©èœããªããªããŸãã ãã®ãããèªåãã¹ãçšã«ç¹å¥ãªAPIãäœæãããã©ã®ãŠãŒã¶ãŒãã©ã®ããŒãžã§ã³ã«ããããæå®ã§ããŸãã ããããããã¯åé¡ãå®å šã«ã¯è§£æ±ºããŸããããªããªãã èªååå²ãã¹ããäžå®å®ã«ããæ°ããåå²ãã¹ããåžžã«è¡šç€ºãããŸãã ãŠãŒã¶ãŒã®ãã¹ãŠã®ãã¹ããç¡å¹ã«ããã¡ãœãããAPIã§äœæããäºå®ã§ãã ãããã£ãŠãåå²ãã¹ãã®ç¹å®ã®ããŒãžã§ã³ã確èªããå¿ èŠãããå Žåããã®ãããªãŠãŒã¶ãŒã®å Žåãä»ã®ãã¹ãŠãç¡å¹ã«ããåŸã1ã€ã®åå²ãã¹ããæå¹ã«ããããšãã§ããŸãã
QAããŒã«ã¯2ã€ã®ããŒã«ã§æ§æãããŠããŸãã
- ãªãã·ã§ã³ã«ãŠãŒã¶ãŒãè¿œå
- ãŠãŒã¶ãŒã該åœãããªãã·ã§ã³ã確èªããŸãã
ãªãã·ã§ã³ã«ãŠãŒã¶ãŒãè¿œå
ãŠãŒã¶ãŒããŠãŒã¶ãŒIDãŸãã¯device_idã§ããªã¢ã³ãã«è¿œå ã§ããŸãïŒã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ã䜿çšããã²ã¹ããŠãŒã¶ãŒã«ãšã£ãŠäŸ¿å©ã§ãïŒã åæã«ãå®çšŒåç°å¢ãŸãã¯éçºç°å¢ïŒcheckmark develïŒããããããè¡ãå¿ èŠããããŠãŒã¶ãŒIDãæå®ã§ããŸãã
ãŠãŒã¶ãŒãããã®ãã§ãã¯ã€ã³ãªãã·ã§ã³
ãã¹ãããªã¢ã³ããååŸããããã«ãŠãŒã¶ãŒããã§ãã¯ãããšãã¯ãå¿ èŠã«å¿ããŠããŠãŒã¶ãŒIDãŸãã¯device_idãããã³ç°å¢ãã£ã«ã¿ãŒã®å€ãæå®ããå¿ èŠããããŸãã [ãã§ãã¯]ãã¿ã³ãã¯ãªãã¯ãããšããŠãŒã¶ãŒãè¡ã£ããã¹ãã®ããŒãžã§ã³ããŸãã¯ãŠãŒã¶ãŒãèœã¡ãªãã£ãçç±ïŒåå²ã°ã«ãŒããé©åããªãã£ããæ¡ä»¶ãæºãããªãã£ããªã©ïŒã衚瀺ãããŸãã
èªåãã¹ã
èªåãã¹ããå®æœããå ŽåãååãšããŠãã©ã³ãã ãªãŠãŒã¶ãŒãããŒã«ããååŸãããŸãã ãŠãŒã¶ãŒããšã«åå²ãã¹ãã®ãªãã·ã§ã³ãç°ãªãããšãå€æããŠãããããèªåãã¹ããæ©èœããªããªããŸãã ãã®ãããèªåãã¹ãçšã«ç¹å¥ãªAPIãäœæãããã©ã®ãŠãŒã¶ãŒãã©ã®ããŒãžã§ã³ã«ããããæå®ã§ããŸãã ããããããã¯åé¡ãå®å šã«ã¯è§£æ±ºããŸããããªããªãã èªååå²ãã¹ããäžå®å®ã«ããæ°ããåå²ãã¹ããåžžã«è¡šç€ºãããŸãã ãŠãŒã¶ãŒã®ãã¹ãŠã®ãã¹ããç¡å¹ã«ããã¡ãœãããAPIã§äœæããäºå®ã§ãã ãããã£ãŠãåå²ãã¹ãã®ç¹å®ã®ããŒãžã§ã³ã確èªããå¿ èŠãããå Žåããã®ãããªãŠãŒã¶ãŒã®å Žåãä»ã®ãã¹ãŠãç¡å¹ã«ããåŸã1ã€ã®åå²ãã¹ããæå¹ã«ããããšãã§ããŸãã
ãã¹ãå€æŽãã°
ãã¹ãå€æŽãã°
åé¡ã®åå ã®æ€çŽ¢ãç°¡çŽ åããããã«ããã¹ãã«å¯Ÿãããã¹ãŠã®å€æŽãããŒã¿ããŒã¹ã«æžã蟌ãŸããå€æŽãã°ããŒãžã«è¡šç€ºãããŸãã
ãããŒãã¹ã
ãããŒãã¹ãã¯æ¬¡ã®ãšããã§ãã
ãã¹ããäœæãããçŽåŸã¯ããã©ããã¹ããŒã¿ã¹ã«ãªã£ãŠããŸãã ãã®ç¶æ ã§ã¯ã補åãããŒãžã£ãŒã¯åœŒãšãéã¶ãããšãã§ããŸãïŒåœŒã®ã¹ã³ã¢ãšä»ã®ãã¹ããšã®äº€ç¹ãåç §ïŒãã誰ãïŒåœŒãšã¹ãŒããŒãŠãŒã¶ãŒãé€ãïŒãã¹ãèªäœãèŠãããšã¯ã§ããŸããã
ãã¹ãã®æºåãã§ãããããããã¯ããããŒãžã£ãŒã¯éçºè ã«ãã¹ããå ¬éããå¿ èŠããããŸãïŒå ¬éã¢ã¯ã·ã§ã³ïŒã ããã§ããã¹ãã¯éçºäžã¹ããŒã¿ã¹ã«ãªããŸãã ãã®ã¹ããŒã¿ã¹ã§ã¯ããã¹ãã®æ¥ä»ç¯å²ã¯ç¡èŠããããã¹ããŠãŒã¶ãŒã®ã¿ã䜿çšã§ããŸãã æ¬çªç°å¢ããã®ãããã远跡ããå°çãå§ãããšããã«ããã¹ããããŒãžã£ãŒã¯ãã¹ãã®æºåãã§ããŠéå§ã§ãããšããéç¥ãåãåããŸãã
å®éã®ãŠãŒã¶ãŒã«å¯ŸããŠãã¹ããå®è¡ããã«ã¯ãå®è¡äžã¹ããŒã¿ã¹ã«ç§»è¡ããå¿ èŠããããŸãã äžæçãªã·ã£ããããŠã³ã®å Žå-äžæåæ¢ïŒäžæåæ¢ç¶æ ïŒã
ãã¹ãå®äº
ãã¹ãã®æåŸïŒå®äºïŒã«ãçµæã®ããŒãžã§ã³ãååŸããããããã¹ãŠã®å ŽæïŒäžçäžïŒã«é©çšãããããã¹ãã®æ¡ä»¶ã«å¿ããŠã®ã¿é©çšãããã決å®ã§ããŸãã
å€ãããŒãžã§ã³ãæ®ãå Žåã¯ãæåŠããããšãã§ããŸãã åæã«ãæåŠã¯å¶åŸ¡ãªãã·ã§ã³ãéžæããããšãšåãã§ã¯ãããŸããã ããã¯ããã§ã¯ãªãããããããéžæè¢ã®äžã€ãæºããããŠããªãã
å°æ¥çã«ã¯ãçµäºåŸã«ã³ãŒããããã¹ãããåãåããããã«ã¿ã¹ã¯ãèªåçã«èšå®ããäºå®ã§ãã
ãã¹ãã¬ã€ã¢ãŠã
ããŒã¿ããŒã¹ãŸãã¯ä»ã®ãªããžããªãããã¹ãã«é¢ããæ å ±ãååŸããŠããŠãŒã¶ãŒã«å¯ŸããŠã©ã®ãã¹ãã®ã©ã®ãªãã·ã§ã³ãã¢ã¯ãã£ãã§ãããã確èªããã ãã§ãããªãã®è²»çšãããããŸãã ãããã£ãŠããã¹ãæ§æãåãµãŒããŒã«ããŒã«ã«ã«ä¿åããããšã«ããŸããã é åãæã€PHPãã¡ã€ã«ãèšå®åœ¢åŒãšããŠéžæãããŸããïŒãã¹ãããšã«åå¥ã®ãã¡ã€ã«ïŒã ãã®éžæã«ããããã€ãã³ãŒããã£ãã·ã¥ã䜿çšããŠãæ§æã®åŠçã«æå°éã®æéãè²»ããããšãã§ããŸãã ãã¹ãã¯ãã¹ãŠã®ãµãŒããŒïŒéçºããã¹ããããã³å®çšŒåïŒã§åæã«è¡ããããããéçºç°å¢ãšãæŠéããã·ã³ã§äœããç°ãªãåäœãããããšã¯ãããŸããã ã¬ã€ã¢ãŠãã«ã¯ãæ®ãã®æ§æãšåãããŒã«ã䜿çšããŸãã
ãªããªã å€ãã®ãµãŒããŒããããã¬ã€ã¢ãŠãã¯ç¬éçã§ã¯ãããŸããïŒæ°åçšåºŠïŒãã解決ãããåé¡ã«ãšã£ãŠããã¯éèŠã§ã¯ãããŸããã ããã«ãã¬ã€ã¢ãŠãã¯ãæåããããªãè¿ éã«éçºç°å¢ã«æž¡ãããŸãã ã€ãŸã äœããä¿®æ£ããå¿ èŠãããå Žåããã®å€æŽã¯ããã«ç¢ºèªã§ããŸãã
å解ããå¿ èŠã®ãããã¹ãã¯ç°¡åã«æ°ä»ãããšãã§ããŸããäžè¬çãªãªã¹ãã§ã¯èµ€ã§åŒ·èª¿è¡šç€ºãããŠããŸãã
çµ±èš
åå²ãã¹ãã®ãã¬ãŒã ã¯ãŒã¯ã§ã¯ãçµ±èšãåéããããšãéèŠã§ãã äž»èŠãªKPIã€ã³ãžã±ãŒã¿ã¯ããŠãŒã¶ãŒãžã®ãã€ã³ããšãšãã«BIã«ãã§ã«éä¿¡ãããŠãããããã»ãšãã©ã®åå²ãã¹ãã§ã¯ãè¿œå ã®çµ±èšãéä¿¡ããå¿ èŠã¯ãããŸããã ãŠãŒã¶ãŒããã¹ãã®1ã€ãŸãã¯å¥ã®ããŒãžã§ã³ã«é¥ã£ãããšã«æ³šæããã ãã§ååã§ãã ãã®ã¢ã¯ã·ã§ã³ã¯ããããéä¿¡ããŠããŸãã ããã§ã®äž»ãªããšã¯ããŠãŒã¶ãŒããã¹ãã§æž¬å®ããå¿ èŠã®ããã¢ã¯ã·ã§ã³ãå®è¡ãããšããäºå®ãšæ··åããªãããšã§ãã ããšãã°ãç·ã®ãã¿ã³ããããè²ãèµ€ã«å€ãã£ãå Žåã«ãã¿ã³ãããé »ç¹ã«ã¯ãªãã¯ããããã©ããã確èªããŸãã ç·ïŒã³ã³ãããŒã«ãªãã·ã§ã³ïŒãŸãã¯èµ€ïŒãã¹ããªãã·ã§ã³ïŒãã¿ã³ã衚瀺ãããæç¹ã§ããããéä¿¡ããå¿ èŠãããããšãããããŸããã ãã¿ã³ã®ã¯ãªãã¯ã¯ãã§ã«BIã«éä¿¡ãããŠãããšæ³å®ãããŠãããããã§ãªãå Žåã¯ãã®ãããªéä¿¡ãè¿œå ããå¿ èŠããããŸããããããªããšãå®éšã®çµæãè©äŸ¡ã§ããŸããã
ãœãããŠã§ã¢ã€ã³ã¿ãŒãã§ãŒã¹
éçºè åãã«ãå€ãA / Bãã¬ãŒã ã¯ãŒã¯ã¯æ¬¡ã®ã¡ãœãããæäŸããŸããã
// , \ABFramework\Utils::matchPercentage( $user_id, // ID , ( ) $from_percent, $to_percent, $salt // , , ); // , .. , \ABFrameworkAPI::addHit($user_id, $test_id, $experiment_id, $variation_id);
A / Bãã¹ãã®ããžãã¯å šäœã®å®è£ ãéçºè ã®è² æ ã«ãªã£ãããšãããããŸããã ãŸããããžãã¯ã«ã¯ããããã®æ¡ä»¶ïŒã©ã®åœãªã©ïŒãšããã®ãªãã·ã§ã³ãŸãã¯ãã®ãªãã·ã§ã³ã«è©²åœãããŠãŒã¶ãŒã®å²åãå«ãŸããŠããŸãã åæã«ãéçºè ã¯ç°¡åã«ééããç¯ãå¯èœæ§ããããŸãïŒäžæ³šæãŸãã¯èŠèŽè ã®åäžæ§ãç解ããŠããªãããïŒã
ããšãã°ããã·ã¢ã®ãã¹ãŠã®ãŠãŒã¶ãŒãéžæããååã«åå²ããå¿ èŠããããŸãã
éçºè ã次ã®ã³ãŒããæžãããšããŸãããïŒ
if ($country_id == \Country::RUSSIA && \ABFramework\Utils::matchPercentage($user_id, 0, 50, 'salt')) { $variation_id = static::VARIATION_ID_TEST; } else { $variation_id = static::VARIATION_ID_CONTROL; } \ABFrameworkAPI::addHit($user_id, static::TEST_ID, static::EXPERIMENT_ID, $variation_id);
ã€ãŸã ã³ã³ãããŒã«ããªã¢ã³ãã«ã¯ãå¥ã®ã»ã°ã¡ã³ãïŒä»ã®åœïŒã®ãŠãŒã¶ãŒãå«ãããå€ãã®ãŠãŒã¶ãŒãå«ãŸããçµæãæ··åšããå¯èœæ§ããããŸãïŒä»ã®åœã®ãŠãŒã¶ãŒã®åäœã¯ç°ãªãå ŽåããããŸãïŒã
ããã°ã©ãã³ã°ã€ã³ã¿ãŒãã§ã€ã¹ã®æ°ããããŒãžã§ã³ã§ã¯ãäžè²«æ§ã®ããã«å®æ°ãæã€ã¯ã©ã¹ã«ç¹å¥ãªåå空é\ UserSplit \ Testsãå²ãåœãŠãããŸããã ãã¹ãã«è¿œå ã®ããžãã¯ããªãå Žåã¯ã\ UserSplit \ Tests \ Commonã¯ã©ã¹ã䜿çšã§ããŸãã
ããªã¢ã³ãå ã®ãããã®ç¢ºèªã¯æ¬¡ã®ãšããã§ãã
$Environment = \UserSplit\CheckerEnvironment::byGlobals(); // environment-, . $Checker = \UserSplit\SplitTests\Checker::getInstance(); // DI , , .. $variant = $Checker->getActiveVariant(\UserSplit\Tests\Common::MY_SPLIT_TEST_KEY, $User, $Environment); if ($variant === \UserSplit\Tests\Common::MY_SPLIT_TEST_VARIANT_TEST) { // } else { // }
\ UserSplit \ SplitTests \ Checker :: getActiveVariantïŒïŒã¡ãœãããåŒã³åºããããšããããã¯èªåçã«èšé²ãããŸãã è¿œå ã®ããžãã¯ããªãå Žåãå€ãããŒãžã§ã³ã®ããã«äžåçã«ãããããããžããããããšã¯ã§ããŸããã
ãããã®èªåãã®ã³ã°ãç¡å¹ã«ããã«ã¯ã4çªç®ã®ãã©ã¡ãŒã¿ãŒfalseãæž¡ãå¿ èŠããããåŸã§ããããäºçŽããããšãå¿ããªãã§ãã ããã
$variant = $Checker->getActiveVariant(\UserSplit\Tests\Common::MY_SPLIT_TEST_KEY, $User, $Environment, false); // - $Checker->logHit(\UserSplit\Tests\Common::MY_SPLIT_TEST_KEY, $variant, $User);
ããã¯ãããšãã°ãæçŽãéä¿¡ãããšãã«å¿ èŠã«ãªãå ŽåããããŸãã ãã®å ŽåããŠãŒã¶ãŒã®ãã¹ãã¯ããŠãŒã¶ãŒãæçŽãèªãã ãšãã«ã®ã¿è¡ãããŸãïŒååãšããŠãããã確èªããæ¹æ³ããããŸãïŒã
ãŠãŒã¶ãŒããã¹ãã±ãŒã¹ã«è©²åœãããã©ãããå€æããããã®è¿œå ã®ããžãã¯ãããå Žåã¯ãç¬èªã®ã¯ã©ã¹ãäœæããå¿ èŠããããŸãã 次ã®ããã«ãªããŸãã
namespace UserSplit\Tests; class MySplitTest { const KEY = 'my_split_test'; const VARIANT_CONTROL = 'control'; const VARIANT_TEST = 'test'; public static function getInstance() { // } public function getActiveVariant(\User $User, $is_log_hit = false) { $Environment = \UserSplit\CheckerEnvironment::byGlobals(); $Checker = \UserSplit\SplitTests\Checker::getInstance(); $variant = $Checker->getActiveVariant(static::KEY, $User, $Environment, false); // : , if (!$variant) { return $variant; } if (!$this->checkSomeAdditinalCondition($User)) { return false; } if ($is_log_hit) { // : , $Checker->logHit(static::KEY, $variant, $User); } return $variant; } }
ããã§ã¯ãã³ã¡ã³ãã«èšèŒãããŠããéèŠãªãã€ã³ãã«æ³šæãæãå¿ èŠããããŸãã ããã§ééããç¯ããããã®ã§ãäŸå€çãªå Žåã«ã®ã¿ãã®ã¢ãããŒãã䜿çšããå¿ èŠããããŸãã ãããã®2ã€ããããŸãã
- ããçš®ã®å°é£ãªæ¡ä»¶ïŒããšãã°ãããŒã¿ããŒã¹ãžã®è¿œå èŠæ±ïŒããããããå¯èœãªãã¹ãæ¡ä»¶ã«è¿œå ããããããŸããããæåŸã«ç¢ºèªããããšããå§ãããŸãã
- ä»ã®ãã¹ãã§å¿ èŠã«ãªãå¯èœæ§ãäœãããã€ãã®ãŠããŒã¯ãªæ¡ä»¶ããããŸãã
顧客ãã¹ã
è¿œå ã®ãµãŒããŒããžãã¯ãå¿ èŠãšããªããã¹ãã¯ãã¯ã©ã€ã¢ã³ãïŒã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ãŸãã¯ãã©ãŠã¶ãŒã®JSïŒã§å®å šã«å®è¡ã§ããŸãã ããšãã°ãç¹ã«ãµãŒããŒã§ã¯ãªãJSã§ãã³ãã¬ãŒããæç»ãããããããã¿ã³ã®è²ã¯ã¯ã©ã€ã¢ã³ãã§å®å šã«ãã¹ãã§ããŸãã ãã®ãããã¢ãã€ã«APIã®å®è£ ãšJSãšã®ããåããå®äºããŸããïŒå®éãåãAPIãããã§äœ¿çšãããŠããŸãïŒã ã¯ã©ã€ã¢ã³ãã¯ããµããŒããããŠãããã¹ãã®ãªã¹ãïŒæ°åã®åœ¢åŒ-æåå圢åŒã®ãã¹ãIDïŒãéä¿¡ãããµãŒããŒã¯ã¢ã¯ãã£ããªãªãã·ã§ã³ïŒåã圢åŒïŒãå«ããã¹ãã®ãªã¹ããå¿çãšããŠéä¿¡ããŸããã ãªããªã æ°ãããã¹ãã§ã¯ããã¹ãããŒãšãªãã·ã§ã³åã䜿çšãå§ããæ°åãšæååãåºå¥ããã®ã¯ç°¡åã§ããããæ°ãããã¹ãã§ã¯ããããã䜿çšããŠæäœãéå§ããŸããã
æ··åã¿ã€ãã®ãã¹ãããããŸãïŒç§ã¯ããããã¯ã©ã€ã¢ã³ããµãŒããŒãšåŒã³ãŸãïŒããµãŒããŒãšã¯ã©ã€ã¢ã³ãã®äž¡æ¹ã§ãã©ã®ãªãã·ã§ã³ãã¢ã¯ãã£ãã§ããããç¥ãå¿ èŠããããŸãã ãã®å Žåããã¹ãã«å ¥ãã ãã§ãªããã¯ã©ã€ã¢ã³ãããã®ãã¹ãããµããŒãããŠãããã©ããã確èªããå¿ èŠããããŸãã
ã¯ã©ã€ã¢ã³ããã¹ããšã¯ã©ã€ã¢ã³ããµãŒããŒãã¹ãã«è¿œå æ¡ä»¶ã®æ€èšŒãè¿œå ããããšã¯ã§ããªããšããäºå®ã«åé¡ããããŸããã ãã®ãããªã€ã³ã¿ãŒãã§ã€ã¹ãäœæãããšããã®ãã§ãã¯ãèªååã§ããŸãã
namespace UserSplit; interface AdditionalConditions { /** * @param \User $User * @param \UserSplit\CheckerEnvironment $Environment * @return boolean */ public static function checkAdditionalConditions(\User $User, \UserSplit\CheckerEnvironment $Environment); }
æ¡ä»¶ã確èªããåŸãè¿œå ã®ãã§ãã¯ãè¡ããŸãïŒãã¹ãã«PHPã¯ã©ã¹ïŒ\ UserSplit \ Testsåå空éã«ããããã¹ãããŒãšåãååã§ããCamelCaseã«ããã¯ã©ã¹ïŒãããããã®ã€ã³ã¿ãŒãã§ã€ã¹ãå®è£ ããŠããå ŽåããããåŒã³åºããŸãã¡ãœããcheckAdditionalConditionsïŒïŒã çµæãåœã®å ŽåããŠãŒã¶ãŒã¯ãã¹ãã«åå ããŠããŸããã ç§ãã¡ã¯ãŸã ãã®ã¢ã€ãã¢ãå®çŸããããšãã§ããŠããŸããããããããã€ããã§ãã
ãŠãŒã¶ãŒã°ã«ãŒã
è«æ±ããŒã ã¯ãããŠãŒã¶ãŒã°ã«ãŒããããŒã«ãéçºããŸããã æåã¯ããŠãŒã¶ãŒã®æ©èœã®å¯çšæ§ãå¶åŸ¡ããããã«äœæãããŸããã
次ã®ããã«äœ¿çšãããŸãããããšãã°ãã¯ãªã¹ãã¹ã«ã¯å£ç¯ã®èŽãç©ããããŸãããã€ã¹ã©ã æåŸã®åœã§ãããã衚瀺ããæå³ã¯ãããŸããã 圌ãã¯ããã§ç¥ããŸãã ãã®å Žåãã¯ãªã¹ãã¹ãç¥ãåœã®ãªã¹ããç»é²ãããŠãŒã¶ãŒã°ã«ãŒããäœæããã¯ãªã¹ãã¹ãã¬ãŒã³ãã衚瀺ããåã«ãŠãŒã¶ãŒãåå ããããšã確èªã§ããŸãã ãããã£ãŠããã®ãŠãŒã¶ãŒã°ã«ãŒãã¯ãéçºè ãä»ããã«Webã€ã³ã¿ãŒãã§ãŒã¹ãä»ããŠå€æŽïŒããšãã°ãåœã®è¿œå ïŒã§ããŸãã ãã®å Žåãåå²ãã¹ãã䜿çšããã®ã¯ééã£ãŠããã§ãããããªããªãã ãªãã·ã§ã³ãæ¯èŒããå¿ èŠã¯ãããŸãããç¹å®ã®ãŠãŒã¶ãŒãµãŒã¯ã«ã«å¯ŸããŠã®ã¿æ©èœãæå¹ã«ããå¿ èŠããããŸãã
ããããçŽæ¥äœ¿çšã«å ããŠããã®ããŒã«ã¯åå²ãã¹ãã«äœ¿çšãããŸããã ããšãã°ããšã³ãã£ãã£ãšããŠã®ãã¹ãã¯ååšãããããªã¢ã³ããè¡šãè€æ°ã®ãŠãŒã¶ãŒã°ã«ãŒãã®åœ¢åŒã§äœæãããŸããã
äžè¬ã«ãåå²ãã¹ããšãŠãŒã¶ãŒã°ã«ãŒãã®ããŒã«ã¯éåžžã«äŒŒãŠããã2ã€ã®é¡äŒŒããããŒã«ãä¿æããããšã¯ããŸãè¯ããããŸããã ãã®ãããUserSplitã«åºã¥ããŠãŠãŒã¶ãŒã°ã«ãŒããäœæããUserSplitã®è«æ±ããŒã ã«ãŠãŒã¶ãŒã°ã«ãŒãã転éããããšã«ããŸããã
ã€ã³ã¿ãŒãã§ã€ã¹ïŒãœãããŠã§ã¢ãšWebã®äž¡æ¹ïŒã¯ãåå²ãã¹ãã€ã³ã¿ãŒãã§ã€ã¹ãšã»ãšãã©åãããã«èŠããŸããããªãã·ã§ã³ããªãããåçŽåãããŠããŸãã ããã¯ãããã°ã©ã ã€ã³ã¿ãŒãã§ã€ã¹ã®å€èŠ³ã§ãã
$Environment = \UserSplit\CheckerEnvironment::byGlobals(); // environment-, . $Checker = \UserSplit\UserGroups\Checker::getInstance(); // DI , , , .. $is_in_group = $Checker->isInGroup(\UserSplit\Groups\Common::MY_USER_GROUP_KEY, $User, $Environment); if ($is_in_group) { // , }
UserSplitã€ãã¬ãŒã¿ãŒ
äœããã®ã¢ã¯ã·ã§ã³ãå®è¡ããããã«ãç¹å®ã®æ¡ä»¶ãæºãããã¹ãŠã®ãŠãŒã¶ãŒã調ã¹ãããšãå¿ èŠã«ãªãå ŽåããããŸãã UserSplit Iteratorã¯ãåå²ãã¹ãããã³ãŠãŒã¶ãŒã°ã«ãŒãçšã«äœæãããŸããã ãã¹ããŸãã¯ãŠãŒã¶ãŒã°ã«ãŒãã®ãã¹ãŠã®æ¡ä»¶ãå«ãããŒã¿ããŒã¹ã§æ£ããSQLã¯ãšãªãçæãããã¹ããŸãã¯ãŠãŒã¶ãŒã°ã«ãŒãã«åé¡ããããŠãŒã¶ãŒã®ã¿ãååŸã§ããŸãã
èšç»
ãã§ã«è¡šæãããŠããåé¡ãšèšç»ã«å ããŠãããã«ããã€ãã®ã¢ã€ãã¢ããããŸãã
- ããŒã¯ã³ãã¹ã;
- äºåã¹ã±ãžã¥ãŒã«ã
ããŒã¯ã³ãã¹ã
æææ©èœã®1ã€ãååå€æŽãããèªåœçŽ ïŒããã¹ãïŒã®ãã¹ãã®1ã€ã§ã¯ãå©çãå€§å¹ ã«å¢å ããŸããã ãããããã®ãããªå€æŽã«ã¯å€ãã®éçºè ãªãœãŒã¹ãå¿ èŠã§ãã ãªããªã ããŒã¯ã³ã®ç¬èªã®ç¿»èš³ã·ã¹ãã ããããããããã«ã¹ããªãããã¹ããçµã¿èŸŒãããšã«ããŸããããã®ãããéçºè ãåŒãä»ããå¿ èŠã¯ãããŸããã§ããã çŸåšããã®æ©èœã¯ããã¯ãªãã£ã¹ããŒã ã«ãã£ãŠéçºãããŠããŸãã
äºåã°ã©ã
ãã¹ãããŒãžã§ã¯ããã¹ãã«ãã©ãã£ãã¯ããããã©ãããããã³ãªãã·ã§ã³éã®ãã©ãã£ãã¯ã®åäžæ§ã確èªã§ããããã«ãã©ã®ãªãã·ã§ã³ã«äœäººã®ãŠãŒã¶ãŒã該åœãããã®ã°ã©ãã衚瀺ããäºå®ã§ãã
çµæ
ãã®çµæãéåžžã«åŒ·åãªããŒã«ãéçºã§ããŸãã 6ãæéãæ£åžžã«äœ¿çšãããŠããŸãã çŸåšãçŽ40ã®ãã¹ããå®æœãããçŽ30ã®ãã¹ããéå§ãããŠããŸãã ãªã¯ãšã¹ãããšã®å¹³åçãªãã¹ãã§ã®ãŠãŒã¶ãŒã®ãããã®ç¢ºèªã¯ãçŽ0.5ããªç§ã§ãã
ãã®ãããã¯ã«ã€ããŠè³ªåãããå Žåã¯ãã³ã¡ã³ãã§ãæ°è»œã«ãåãåãããã ããã
ãããŠãUserSplitã®éçºã«åå ãããã¹ãŠã®äººã«æè¬ããŸãïŒ
PHPéçºè ã®Rinat Akhmadeevæ°ã