Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for percentChange (0.19 sec)

  1. testing/internal-performance-testing/src/test/groovy/org/gradle/performance/fixture/PrettyCalculatorSpec.groovy

    import org.gradle.performance.measure.Duration
    import spock.lang.Specification
    
    import static org.gradle.performance.results.PrettyCalculator.percentChange
    
    class PrettyCalculatorSpec extends Specification {
    
        def "knows percentage change"() {
            expect:
            percentChange(Amount.valueOf(current, Duration.SECONDS), Amount.valueOf(previous, Duration.SECONDS)) == percent
    
            where:
            current  | previous | percent
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  2. testing/internal-performance-testing/src/main/groovy/org/gradle/performance/results/PrettyCalculator.groovy

        static String toMillis(Amount<Duration> duration) {
            return duration.toUnits(Duration.MILLI_SECONDS).value.setScale(3, RoundingMode.HALF_UP).stripTrailingZeros().toString() + " ms"
        }
    
        static <Q> Number percentChange(Amount<Q> current, Amount<Q> previous) {
            if (previous == Amount.valueOf(0, previous.getUnits())) {
                return 100 as Integer
            }
            BigDecimal result = (current - previous) / previous * 100
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. testing/internal-performance-testing/src/main/groovy/org/gradle/performance/results/BaselineVersion.groovy

                def desc = diff > Duration.millis(0) ? "slower" : "faster"
                sb.append("Difference: ${diff.abs().format()} $desc (${toMillis(diff.abs())}), ${PrettyCalculator.percentChange(currentVersionMean, thisVersionMean)}%\n")
                sb.append(current.speedStats)
                sb.append(results.speedStats)
                sb.append("\n")
                sb.toString()
            } else {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. src/cmd/vendor/github.com/google/pprof/internal/driver/html/stacks.js

      // E.g., 9s (45%) 🠆 10s (50%)
      function diffText(from, to) {
        return percentText(from) + " 🠆 " + percentText(to);
      }
    
      // percentText returns text that displays v in appropriate units alongside its
      // percentange.
      function percentText(v) {
        function percent(v, total) {
          return Number(((100.0 * v) / total).toFixed(1)) + '%';
        }
        return unitText(v) + " (" + percent(v, stacks.Total) + ")";
      }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  5. src/internal/trace/traceviewer/static/trace_viewer_full.html

    const rightRange=tr.b.math.Range.fromExplicitRange(intersection.max,rangeA.max);if(rightRange.duration>0){resultRanges.push(rightRange);}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 20:45:06 UTC 2023
    - 2.5M bytes
    - Viewed (0)
Back to top