Commit Graph

10 Commits

Author SHA1 Message Date
a45c7581d5 Enhance new user cohort optimization by adding language fallback for missing user data and including country in the information retrieval process 2025-08-29 17:45:50 +09:00
c08c4cf483 Optimize new user cohort selection by prioritizing auth.id collection and enhancing logging details 2025-08-29 14:26:04 +09:00
02333ae272 완료된 수정사항
1. create_uid 기준 전체 코호트 포함

  - create_uid에서 식별된 모든 신규 유저(126,666명)를 코호트에 포함
  - 계정만 생성하고 이탈한 유저도 분석 대상에 포함

  2. log_return_to_lobby 차선책 로직 추가

  - login_comp에서 데이터를 수집하지 못한 유저들에 대해
  - log_return_to_lobby 인덱스에서 body.nickname 수집
  - 우선순위: login_comp → log_return_to_lobby

  3. 성능 최적화 설정 업데이트

  - DEFAULT_BATCH_SIZE: 500 → 2000 (4배 증가)
  - DEFAULT_MAX_WORKERS: 6 → 16 (2.7배 증가)
  - DEFAULT_COMPOSITE_SIZE: 500 → 2000 (4배 증가)

  🔍 변경된 처리 로직

  1. Step 1: create_uid에서 신규 유저 식별 (기존과 동일)
  2. Step 2: heartbeat에서 auth.id 수집 (기존과 동일)
  3. Step 3: 모든 create_uid 유저를 코호트에 우선 추가
  4. Step 4: login_comp에서 추가 정보 수집 (1차 우선)
  5. Step 5: log_return_to_lobby에서 차선 정보 수집

  이제 누락 없이 모든 신규 유저가 분석 대상에 포함되며, 처리 속도도 크게 향상될 것입니다.
2025-08-29 13:43:23 +09:00
846a39ac7a 수정 완료 사항
1. first_login_time 필드 제거 및 create_time으로 통합

  - get_new_user_cohort_optimized 함수에서 first_login_* 필드들을 제거하고 create_time_*으로 통합
  - build_fixed_msearch_queries와 calculate_comprehensive_session_metrics에서 first_login_dt를 create_time_dt로 변경
  - CSV 헤더에서 first_login_time 제거

  2. auth.id 수집 로직 수정

  - create_uid 인덱스에서 auth.id를 정확히 수집하여 new_user_map에 저장
  - result 딕셔너리 생성 시 auth_id 필드에 기본값 처리 추가

  3. retention_status 판정을 create_time 기준으로 변경

  - 모든 시간 범위 계산을 create_time_dt 기준으로 변경
  - D+0, D+1 판정이 계정 생성 시점 기준으로 작동

  4. 세션 관련 지표를 --full 옵션으로 조건부 실행

  - --full 명령줄 옵션 추가
  - process_fixed_batch 함수에 include_session_metrics 파라미터 추가
  - --full 옵션이 없으면 active_seconds, total_playtime_minutes, session_count, avg_session_length을 0으로 설정하여 빠른
  실행 가능

  이제 스크립트는 다음과 같이 실행할 수 있습니다:
  - 빠른 분석: python ds_new_user_analy.py --start-time "2025-08-16T12:00:00+09:00" --end-time "2025-08-16T14:00:00+09:00"
  - 전체 분석: python ds_new_user_analy.py --start-time "2025-08-16T12:00:00+09:00" --end-time "2025-08-16T14:00:00+09:00"
   --full

 수정이 완료되었습니다. 이제 get_new_user_cohort_optimized 함수는:

  1. Step 1: create_uid 인덱스에서 신규 유저와 계정 생성 시간 수집 (auth.id는 빈값이므로 수집하지 않음)
  2. Step 2: heartbeat 인덱스에서 각 UID에 대한 auth.id 수집
  3. Step 3: login_comp 인덱스에서 추가 정보(닉네임, 언어, 디바이스) 수집
2025-08-29 12:36:33 +09:00
37ed0cfa19 Fix CSV file name in logging output for new user analysis script 2025-08-29 11:41:29 +09:00
ff1878cc90 Enhance new user cohort selection by utilizing create_uid index and improving logging details 2025-08-28 21:54:25 +09:00
829d504936 결과물 파일명 변경 2025-08-27 17:21:05 +09:00
f859a31e7d Refactor metrics configuration and improve query efficiency by updating field references and aggregation types 2025-08-27 04:45:07 +09:00
2a7a481e55 Implement code changes to enhance functionality and improve performance 2025-08-27 02:15:45 +09:00
2cc58c18c4 분석 스크립트 초안 작성 2025-08-27 01:10:50 +09:00