public static org.joda.time.Duration formatDuration(String duration) {
        PeriodFormatter f = new PeriodFormatterBuilder()
            .appendWeeks().appendSuffix("w")
            .appendDays().appendSuffix("d")
            .appendHours().appendSuffix("h")
            .appendMinutes().appendSuffix("m")
            .appendSeconds().appendSuffix("s")
            .appendMillis().appendSuffix("ms")
            .toFormatter();
        return f.parsePeriod(duration).toStandardDuration();
    }
Format duration string to org.joda.time.Duration.
Don't support year and month because the days vary in length.
@param duration such as "5d", "30m", "5d30m, "1w, "1w5d"
@return org.joda.time.Duration
oap-server/server-query-plugin/promql-plugin/src/main/java/org/apache/skywalking/oap/query/promql/rt/PromOpUtils.java