Calibrate carrier data usage scale

This commit is contained in:
seo
2026-06-26 01:12:13 +09:00
parent 41ee218bfc
commit ec8adbd56d
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -115,6 +115,7 @@ Worker 교체나 예외 종료로 `processing`, `ui_timeout_pending` 상태가
- 차량 TCP 실패 reason과 마지막 수신 지연을 확인합니다.
- 명령별 rate limit과 감사 로그를 유지합니다.
- 통신사 기준 데이터 사용량 보정값을 주기적으로 확인합니다. 2026-06-15 18:47 T world 실측 66.44MB(68030KB) 기준 2026-06 보정값은 통신사 누적 69,662,720 bytes, 로컬 보정 전 누적 35,100,790 bytes, 배율 1.984648입니다.
- 통신사 기준 데이터 사용량 보정값을 주기적으로 확인합니다. 2026-06-26 01:10 T world 실측 102.4MB(104,834KB) 기준 2026-06 보정값은 통신사 누적 107,350,016 bytes, 로컬 보정 전 누적 54,104,011 bytes, 배율 1.984142입니다.
- 직전 배율 1.984648 기준 현재값은 107,377,429 bytes로 계산되어 T world보다 27,413 bytes(약 0.026MB) 높았고, 새 배율은 직전보다 0.000507 낮아졌습니다.
- 4.95초 timeout 직후에는 사용량 기록이 즉시 생기지 않을 수 있으며, 최대 60초 뒤 늦은 정산 행이 추가될 수 있습니다.
- `systemctl status car-tcp-worker.service``journalctl -u car-tcp-worker.service`로 worker 상태를 확인합니다.
+1 -1
View File
@@ -27,7 +27,7 @@ const RECEIVE_GAP_LIMIT_SEC = 60;
// SKT T world "잔여기본통화 정보" 기준 현재월 누적값.
// carrier_total_bytes / meter_adjusted_bytes 로 보정 배율을 역산해 로컬 송수신 계측값에 적용한다.
const DATA_CURRENT_BILLING_USAGE_BYTES = [
'2026-06' => ['total_bytes' => 69662720, 'meter_adjusted_bytes' => 35100790, 'included_bytes' => 104857600, 'coupon_registered_at' => null],
'2026-06' => ['total_bytes' => 107350016, 'meter_adjusted_bytes' => 54104011, 'included_bytes' => 104857600, 'coupon_registered_at' => null],
];
function car_db(): PDO