package com.influx;
import com.influxdb.client.WriteOptions;
import com.influxdb.client.domain.WritePrecision;

public class InfluxDBConfig {
    public static WriteOptions getWriteOptions() {
        return WriteOptions.builder()
                .batchSize(com.config.AppConfig.getInfluxBatchSize())
                .flushInterval(com.config.AppConfig.getInfluxFlushInterval())
                .jitterInterval(1000)
                .retryInterval(com.config.AppConfig.getInfluxRetryDelay())
                .build();
    }

    public static WritePrecision getWritePrecision() {
        return WritePrecision.MS; // 毫秒精度
    }
}