[benchmark] Add ReplaceSubrange benchmark

🔨 Changes
Add ReplaceSubrange benchmark. It is still work in progress, but it would be great if I could get feedback to make sure I'm on the right direction 🙇♂
Resolves a part of SR-8905 Gaps in String benchmarking.
Shout-out to Rob and Michael for mentoring at try! Swift San Jose!
To-do list

[x] Arguments of types String
[x] Substring
[x] Array
[x] Repeated

@milseman I'm thinking this is in your wheelhouse.

@swift-ci please smoke test

@swift-ci please benchmark

Performance: -O

Regression
OLD
NEW
DELTA
RATIO

CharacterLiteralsLarge
97
108
+11.3%
0.90x

Improvement
OLD
NEW
DELTA
RATIO

ArrayAppendGenericStructs
2290
1340
-41.5%
1.71x (?)

ObjectiveCBridgeStubFromNSStringRef
175
158
-9.7%
1.11x (?)

Added
MIN
MAX
MEAN
MAX_RSS

ReplaceSubrangeWithLargeLiteralString
1899
1941
1921
—

ReplaceSubrangeWithLargeManagedString
1820
1865
1835
—

ReplaceSubrangeWithSmallLiteralString
1994
2070
2024
—

Code size: -O
Performance: -Osize

Regression
OLD
NEW
DELTA
RATIO

CharacterLiteralsLarge
100
111
+11.0%
0.90x (?)

Set.subtracting.Seq.Empty.Box
211
227
+7.6%
0.93x (?)

Improvement
OLD
NEW
DELTA
RATIO

FlattenListLoop
5276
4673
-11.4%
1.13x (?)

Added
MIN
MAX
MEAN
MAX_RSS

ReplaceSubrangeWithLargeLiteralString
1839
1936
1880
—

ReplaceSubrangeWithLargeManagedString
1809
1868
1830
—

ReplaceSubrangeWithSmallLiteralString
1988
2102
2026
—

Code size: -Osize
Performance: -Onone

Regression
OLD
NEW
DELTA
RATIO

ArrayAppendGenericStructs
1380
2220
+60.9%
0.62x (?)

Added
MIN
MAX
MEAN
MAX_RSS

ReplaceSubrangeWithLargeLiteralString
4321
4387
4343
—

ReplaceSubrangeWithLargeManagedString
3748
3805
3769
—

ReplaceSubrangeWithSmallLiteralString
3655
3720
3690
—

Code size: -swiftlibs

✅
Benchmark Check Report

⚠🔤
ReplaceSubrangeWithLargeLiteralString name is composed of 6 words.  Split ReplaceSubrangeWithLargeLiteralString name into dot-separated groups and variants. See http://bit.ly/BenchmarkNaming

⚠⏱
ReplaceSubrangeWithLargeLiteralString execution took at least 1811 μs.  Decrease the workload of ReplaceSubrangeWithLargeLiteralString by a factor of 2 (10), to be less than 1000 μs.

⚠🔤
ReplaceSubrangeWithLargeManagedString name is composed of 6 words.  Split ReplaceSubrangeWithLargeManagedString name into dot-separated groups and variants. See http://bit.ly/BenchmarkNaming

⚠⏱
ReplaceSubrangeWithLargeManagedString execution took at least 1798 μs.  Decrease the workload of ReplaceSubrangeWithLargeManagedString by a factor of 2 (10), to be less than 1000 μs.

⚠🔤
ReplaceSubrangeWithSmallLiteralString name is composed of 6 words.  Split ReplaceSubrangeWithSmallLiteralString name into dot-separated groups and variants. See http://bit.ly/BenchmarkNaming

⚠⏱
ReplaceSubrangeWithSmallLiteralString execution took at least 1994 μs.  Decrease the workload of ReplaceSubrangeWithSmallLiteralString by a factor of 2 (10), to be less than 1000 μs.

How to read the data
The tables contain differences in performance which are larger than 8% and
differences in code size which are larger than 1%.
If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.
Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@keitaito This is a great start, but can you address the issues listed at the bottom of the benchmark comment, please?

@keitaito I suggest naming these benchmarks per naming convention as

String.replaceSubrange.SmallLiteral
String.replaceSubrange.LargeLiteral
String.replaceSubrange.LargeManaged

and the file  as StringReplaceSubrange.swift.

You need to half the loop multiplier. Mind the 80 character line limit. I would also just create a single testing function and pass the string as parameter. Since it'll be marked as @inline(never), you don't need to use getString to prevent the optimizations. Then you'd use inline closure to define runFunctions. You can initialize the large managed string in setup also with inline closure and blackHole function:
let t: [BenchmarkCategory] = [.validation, .api, .String]

public let StringReplaceSubrange = [
  BenchmarkInfo(name: "String.replaceSubrange.SmallLiteral",
    runFunction: { replaceSubrange($0, "coffee" }, tags: t),
  BenchmarkInfo(name: "String.replaceSubrange.LargeLiteral",
    runFunction: { replaceSubrange($0, "coffee\u{301}coffeecoffeecoffee" },
    tags: t),
  BenchmarkInfo(name: "ReplaceSubrangeWithLargeManagedString",
    runFunction: { replaceSubrange($0, largeManaged) }, tags: t,
    setUpFunction: { blackHole(largeManaged) }),
]

@inline(never)
public func replaceSubrange(_ N: Int, _ string: String) {
  var copy = string
  let range = string.startIndex..<string.index(after: string.startIndex)
  for _ in 0 ..< 5_000*N {
    copy.replaceSubrange(range, with: "t")
  }
}

@milseman Does it make sense to test range replacement with a single character that doesn't change the size? How about something like this?
@inline(never)
public func replaceSubrange(_ N: Int, _ string: String) {
  var s = string
  for _ in 0 ..< 2_500*N {
    let ff =
      s.index(s.startIndex, offsetBy:2)..<s.index(s.startIndex, offsetBy:4)
    s.replaceSubrange(ff, with: "☕")
    let cup =
      s.index(s.startIndex, offsetBy:2)..<s.index(s.startIndex, offsetBy:3)
    copy.replaceSubrange(cup, with: "ff")
  }
  CheckResults(s == string)
}

Also, since replaceSubrange is mutable operation, how much sense does it make to vary these across literals and managed strings? After the initial modification, wouldn't this differ only in StringGuts(_SmallString or not)?

@milseman Could you also please verify my reasoning above regarding the getString and shared run function? I'm starting to doubt myself looking at the reported runtimes…

@brentdax Thanks Brent for running tests 😄
@palimondo Hi Pavol, thanks for the great feedback! I will start working on easy fixes like re-naming the file and benchmarks, and fixing line length 🔨

@palimondo

I would also just create a single testing function and pass the string as parameter. Since it'll be marked as @inline(never), you don't need to use getString to prevent the optimizations.

I don't think @inline(never) is sufficient here, but I agree with having a single function that runs over different workloads. You could say:
@inline(never)
public func replaceSubrange(_ N: Int, _ string: String) {
  var copy = getString(string)
  let range = string.startIndex..<string.index(after: string.startIndex)
  for _ in 0 ..< 5_000*N {
    copy.replaceSubrange(range, with: "t")
  }
}

So there's no measurable overhead in the getString call, but it serves as an optimization barrier, should the optimizer ever do more inter-procedural optimizations that are not contingent on prior inlining.

Also, would it make sense to do a variant that would cross the boundary between the small and large representations? Or vary the benchmarks based on the position of the range, i.e. replacing from start, in the middle or just at the end, to stress the reallocations?

I think a benchmark that grows a small string to a large one could be interesting. We don't often go the other way, and we don't shrink the string under normal operations (but keepingCapacity: false, making a brand new one, etc., will form the small string). If a string is already allocated with excess capacity, it's likely the user requested that capacity or are otherwise going to be filling it soon, so there's more harm in deallocating it right away only to re-allocate.
I don't think it matters what that operation is, and append is more straightforward for a micro-benchmark than replaceSubrange.

@swift-ci please benchmark

Performance: -O

Regression
OLD
NEW
DELTA
RATIO

ObjectiveCBridgeStubNSDateRefAccess
174
196
+12.6%
0.89x (?)

ArrayAppendGenericStructs
580
650
+12.1%
0.89x (?)

ParseFloat.Float.Exp
10
11
+10.0%
0.91x (?)

ObjectiveCBridgeStubFromNSStringRef
85
92
+8.2%
0.92x (?)

Added
MIN
MAX
MEAN
MAX_RSS

Str.replaceSubrange.LargeManaged.ArrChar
710
711
710
—

Str.replaceSubrange.LargeManaged.RepeatedChar
18464
18776
18614
—

Str.replaceSubrange.LargeManaged.String
565
565
565
—

Str.replaceSubrange.LargeManaged.Substr
1140
1141
1141
—

Str.replaceSubrange.SmallLiteral.ArrChar
543
544
543
—

Str.replaceSubrange.SmallLiteral.RepeatedChar
2727
2762
2750
—

Str.replaceSubrange.SmallLiteral.String
627
627
627
—

Str.replaceSubrange.SmallLiteral.Substr
637
637
637
—

Code size: -O

Regression
OLD
NEW
DELTA
RATIO

TestsUtils.o
25398
25686
+1.1%
0.99x

Performance: -Osize

Regression
OLD
NEW
DELTA
RATIO

RandomShuffleLCG2
400
448
+12.0%
0.89x (?)

MapReduceAnyCollection
238
260
+9.2%
0.92x (?)

FlattenListLoop
2424
2646
+9.2%
0.92x (?)

MapReduce
237
258
+8.9%
0.92x (?)

RemoveWhereFilterInts
25
27
+8.0%
0.93x (?)

ArraySetElement
283
305
+7.8%
0.93x (?)

Improvement
OLD
NEW
DELTA
RATIO

ObjectiveCBridgeStubFromNSStringRef
93
83
-10.8%
1.12x (?)

Added
MIN
MAX
MEAN
MAX_RSS

Str.replaceSubrange.LargeManaged.ArrChar
719
719
719
—

Str.replaceSubrange.LargeManaged.RepeatedChar
17841
18304
18053
—

Str.replaceSubrange.LargeManaged.String
601
611
604
—

Str.replaceSubrange.LargeManaged.Substr
1218
1278
1238
—

Str.replaceSubrange.SmallLiteral.ArrChar
713
1234
1000
—

Str.replaceSubrange.SmallLiteral.RepeatedChar
2761
2871
2807
—

Str.replaceSubrange.SmallLiteral.String
673
673
673
—

Str.replaceSubrange.SmallLiteral.Substr
716
717
716
—

Code size: -Osize
Performance: -Onone

Regression
OLD
NEW
DELTA
RATIO

ArrayAppendGenericStructs
640
980
+53.1%
0.65x (?)

Improvement
OLD
NEW
DELTA
RATIO

StringToDataSmall
750
700
-6.7%
1.07x (?)

Added
MIN
MAX
MEAN
MAX_RSS

Str.replaceSubrange.LargeManaged.ArrChar
951
952
952
—

Str.replaceSubrange.LargeManaged.RepeatedChar
19303
19516
19381
—

Str.replaceSubrange.LargeManaged.String
618
630
622
—

Str.replaceSubrange.LargeManaged.Substr
1178
1179
1178
—

Str.replaceSubrange.SmallLiteral.ArrChar
772
773
772
—

Str.replaceSubrange.SmallLiteral.RepeatedChar
2916
3044
2959
—

Str.replaceSubrange.SmallLiteral.String
693
706
701
—

Str.replaceSubrange.SmallLiteral.Substr
672
685
677
—

Code size: -swiftlibs

✅
Benchmark Check Report

⚠⏱
Str.replaceSubrange.LargeManaged.Substr execution took at least 1055 μs.  Decrease the workload of Str.replaceSubrange.LargeManaged.Substr by a factor of 2 (10), to be less than 1000 μs.

⛔🔤
Str.replaceSubrange.SmallLiteral.RepeatedChar name is 45 characters long.  Benchmark name should not be longer than 40 characters.

⚠⏱
Str.replaceSubrange.SmallLiteral.RepeatedChar execution took at least 2605 μs.  Decrease the workload of Str.replaceSubrange.SmallLiteral.RepeatedChar by a factor of 4 (10), to be less than 1000 μs.

⚠Ⓜ
Str.replaceSubrange.SmallLiteral.RepeatedChar has very wide range of memory used between independent, repeated measurements.  Str.replaceSubrange.SmallLiteral.RepeatedChar mem_pages [i1, i2]: min=[17, 17] 𝚫=0 R=[6, 24]

⛔🔤
Str.replaceSubrange.LargeManaged.RepeatedChar name is 45 characters long.  Benchmark name should not be longer than 40 characters.

⛔⏱
Str.replaceSubrange.LargeManaged.RepeatedChar execution took at least 17762 μs.  Decrease the workload of Str.replaceSubrange.LargeManaged.RepeatedChar by a factor of 32 (100), to be less than 1000 μs.

⚠Ⓜ
Str.replaceSubrange.LargeManaged.RepeatedChar has very wide range of memory used between independent, repeated measurements.  Str.replaceSubrange.LargeManaged.RepeatedChar mem_pages [i1, i2]: min=[50, 44] 𝚫=6 R=[15, 22]

How to read the data
The tables contain differences in performance which are larger than 8% and
differences in code size which are larger than 1%.
If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.
Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac mini
  Model Identifier: Macmini8,1
  Processor Name: Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

@palimondo Thank you so much for another review, Pavol! I will address your comments and fix warnings and errors from the swift-ci benchmark check report 🔨

Several build failure errors are suddenly thrown when running ninja swift-benchmark-macosx-x86_64 😢 Have you seen these errors? Do you have any ideas how to fix them and re-build swift-benchmark?
$ ninja swift-benchmark-macosx-x86_64

swift-source/swift/stdlib/public/stubs/MathStubs.cpp:21:10: fatal error: 'climits' file not found
swift-source/swift/include/swift/Runtime/Debug.h:20:10: fatal error: 'cstdarg' file not found
swift-source/swift/stdlib/public/stubs/CommandLine.cpp:17:10: fatal error: 'vector' file not found
swift-source/swift/stdlib/public/stubs/LibcShims.cpp:30:10: fatal error: 'type_traits' file not found
swift-source/swift/include/swift/Runtime/Debug.h:20:10: fatal error: 'cstdarg' file not found
swift-source/swift/stdlib/public/stubs/ThreadLocalStorage.cpp:13:10: fatal error: 'cstring' file not found
swift-source/swift/stdlib/public/stubs/Stubs.cpp:37:10: fatal error: 'climits' file not found
swift-source/swift/stdlib/public/stubs/../SwiftShims/RefCount.h:30:10: fatal error: 'type_traits' file not found
swift-source/swift/include/swift/Basic/Lazy.h:16:10: fatal error: 'memory' file not found

swift-source/swift/stdlib/public/runtime/ImageInspection.h:25:10: fatal error: 'cstdint' file not found
swift-source/swift/include/swift/ABI/Metadata.h:20:10: fatal error: 'atomic' file not found
swift-source/llvm/include/llvm/Support/Compiler.h:20:10: fatal error: 'new' file not found
swift-source/swift/include/swift/Runtime/HeapObject.h:20:10: fatal error: 'cstddef' file not found
swift-source/swift/include/swift/Basic/Range.h:38:10: fatal error: 'algorithm' file not found
swift-source/swift/include/swift/Demangling/Demangle.h:22:10: fatal error: 'memory' file not found
swift-source/swift/include/swift/Basic/Lazy.h:16:10: fatal error: 'memory' file not found
swift-source/swift/include/swift/Basic/Lazy.h:16:10: fatal error: 'memory' file not found
swift-source/swift/include/swift/ABI/Metadata.h:20:10: fatal error: 'atomic' file not found
swift-source/swift/include/swift/ABI/Metadata.h:20:10: fatal error: 'atomic' file not found

A lot of error messages are displayed on Terminal. Here is an example of a build failure error.
[1/743] Building CXX object stdlib/public/runtime/CMakeFiles/swiftRuntime-macosx-x86_64.dir/Enum.cpp.o
FAILED: stdlib/public/runtime/CMakeFiles/swiftRuntime-macosx-x86_64.dir/Enum.cpp.o
/[my-own-path]/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/./bin/clang++  -DCMARK_STATIC_DEFINE -DGTEST_HAS_RTTI=0 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Istdlib/public/runtime -I/[my-own-path]/swift-source/swift/stdlib/public/runtime -Iinclude -I/[my-own-path]/swift-source/swift/include -I/[my-own-path]/swift-source/llvm/include -I/[my-own-path]/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/include -I/[my-own-path]/swift-source/llvm/tools/clang/include -I/[my-own-path]/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/tools/clang/include -I/[my-own-path]/swift-source/cmark/src -I/[my-own-path]/swift-source/build/Ninja-RelWithDebInfoAssert/cmark-macosx-x86_64/src -Wno-unknown-warning-option -Werror=unguarded-availability-new -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-class-memaccess -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -Werror=switch -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -fno-sanitize=all -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1 -O2  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk   -UNDEBUG  -fno-exceptions -fno-rtti -Wall -Wglobal-constructors -Wexit-time-destructors -fvisibility=hidden -DSWIFT_RUNTIME_CLOBBER_FREED_OBJECTS=1 -DswiftCore_EXPORTS -I/[my-own-path]/swift-source/swift/include -DSWIFT_TARGET_LIBRARY_NAME=swiftRuntime -target x86_64-apple-macosx10.9 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/../../../Developer/Library/Frameworks -mmacosx-version-min=10.9 -O2 -g -UNDEBUG -DSWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS -MD -MT stdlib/public/runtime/CMakeFiles/swiftRuntime-macosx-x86_64.dir/Enum.cpp.o -MF stdlib/public/runtime/CMakeFiles/swiftRuntime-macosx-x86_64.dir/Enum.cpp.o.d -o stdlib/public/runtime/CMakeFiles/swiftRuntime-macosx-x86_64.dir/Enum.cpp.o -c /[my-own-path]/swift-source/swift/stdlib/public/runtime/Enum.cpp
In file included from /[my-own-path]/swift-source/swift/stdlib/public/runtime/Enum.cpp:17:
In file included from /[my-own-path]/swift-source/llvm/include/llvm/Support/ErrorHandling.h:18:
/[my_path]swift-source/llvm/include/llvm/Support/Compiler.h:20:10: fatal error: 'new' file not found
#include <new>
         ^~~~~
1 error generated.

I'm not sure if it's related, but these errors started being thrown after Xcode 11 beta 3 was installed on my machine, FWIW.

I'd guess you need to do a clean build after Xcode update.

@palimondo Thanks for the reply on the build issue, Pavol! I ended up re-building everything from scratch 😅

The benchmark with Repeated<Character> takes much longer time than others. Do you have any idea why this type is slower than others? Is there any way to improve this benchmark? The benchmark result on my machine is the following:
// When the for-in loop runs with `0 ..< 5_000 * N`
$ ./Benchmark_O 772 773 774 775 776 777 778 779
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs)
772,String.replaceSubrange.ArrChar,1,2049,2049,2049,0,2049
773,String.replaceSubrange.ArrChar.Small,1,1240,1240,1240,0,1240
774,String.replaceSubrange.RepChar,1,31690,31690,31690,0,31690
775,String.replaceSubrange.RepChar.Small,1,4670,4670,4670,0,4670
776,String.replaceSubrange.String,1,1105,1105,1105,0,1105
777,String.replaceSubrange.String.Small,1,1233,1233,1233,0,1233
778,String.replaceSubrange.Substring,1,2771,2771,2771,0,2771
779,String.replaceSubrange.Substring.Small,1,1477,1477,1477,0,1477

Total performance tests executed: 8

// When the for-in loop runs with `0 ..< 250 * N`
$ ./Benchmark_O 772 773 774 775 776 777 778 779
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs)
772,String.replaceSubrange.ArrChar,1,92,92,92,0,92
773,String.replaceSubrange.ArrChar.Small,1,54,54,54,0,54
774,String.replaceSubrange.RepChar,1,1209,1209,1209,0,1209
775,String.replaceSubrange.RepChar.Small,1,186,186,186,0,186
776,String.replaceSubrange.String,1,54,54,54,0,54
777,String.replaceSubrange.String.Small,1,52,52,52,0,52
778,String.replaceSubrange.Substring,1,122,122,122,0,122
779,String.replaceSubrange.Substring.Small,1,63,63,63,0,63

Total performance tests executed: 8

@keitaito there are explicit pre-specializations for the others: https://github.com/apple/swift/blob/master/stdlib/public/core/StringRangeReplaceableCollection.swift#L197
Benchmarking a non-pre-specialized argument type helps identify and track changes in the fully-generic implementation.

@swift-ci please benchmark

@swift-ci please benchmark

I’m running the benchmarks on CI with your current multiplier (5000), to get a relation to your local results.

Performance: -O

Improvement
OLD
NEW
DELTA
RATIO

FlattenListFlatMap
5939
4087
-31.2%
1.45x (?)

SuffixSequenceLazy
319
289
-9.4%
1.10x (?)

SuffixSequence
317
291
-8.2%
1.09x (?)

Added
MIN
MAX
MEAN
MAX_RSS

String.replaceSubrange.ArrChar
714
740
729
—

String.replaceSubrange.ArrChar.Small
568
580
574
—

String.replaceSubrange.RepChar
18516
18770
18664
—

String.replaceSubrange.RepChar.Small
2657
2779
2701
—

String.replaceSubrange.String
480
494
487
—

String.replaceSubrange.String.Small
564
580
572
—

String.replaceSubrange.Substring
1132
1147
1141
—

String.replaceSubrange.Substring.Small
644
658
652
—

Code size: -O
Performance: -Osize

Improvement
OLD
NEW
DELTA
RATIO

FlattenListLoop
2736
2167
-20.8%
1.26x (?)

Dictionary4
207
165
-20.3%
1.25x

CharacterLiteralsLarge
67
58
-13.4%
1.16x (?)

CharacterLiteralsSmall
220
202
-8.2%
1.09x (?)

Added
MIN
MAX
MEAN
MAX_RSS

String.replaceSubrange.ArrChar
707
708
708
—

String.replaceSubrange.ArrChar.Small
555
555
555
—

String.replaceSubrange.RepChar
17925
18117
18022
—

String.replaceSubrange.RepChar.Small
2611
2660
2628
—

String.replaceSubrange.String
488
488
488
—

String.replaceSubrange.String.Small
575
587
579
—

String.replaceSubrange.Substring
1134
1151
1140
—

String.replaceSubrange.Substring.Small
659
671
663
—

Code size: -Osize
Performance: -Onone

Added
MIN
MAX
MEAN
MAX_RSS

String.replaceSubrange.ArrChar
877
931
895
—

String.replaceSubrange.ArrChar.Small
677
677
677
—

String.replaceSubrange.RepChar
18854
18953
18909
—

String.replaceSubrange.RepChar.Small
2857
2949
2916
—

String.replaceSubrange.String
594
596
595
—

String.replaceSubrange.String.Small
670
682
674
—

String.replaceSubrange.Substring
1209
1269
1229
—

String.replaceSubrange.Substring.Small
727
728
727
—

Code size: -swiftlibs

✅
Benchmark Check Report

⛔⏱
String.replaceSubrange.RepChar execution took at least 17589 μs.  Decrease the workload of String.replaceSubrange.RepChar by a factor of 32 (100), to be less than 1000 μs.

⚠⏱
String.replaceSubrange.RepChar.Small execution took at least 2589 μs.  Decrease the workload of String.replaceSubrange.RepChar.Small by a factor of 4 (10), to be less than 1000 μs.

⚠⏱
String.replaceSubrange.Substring execution took at least 1047 μs.  Decrease the workload of String.replaceSubrange.Substring by a factor of 2 (10), to be less than 1000 μs.

How to read the data
The tables contain differences in performance which are larger than 8% and
differences in code size which are larger than 1%.
If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.
Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac mini
  Model Identifier: Macmini8,1
  Processor Name: Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

@palimondo if @keitaito fixes the workload size as recommended in the report, are we good to go?

--
--

⛔⏱
String.replaceSubrange.RepChar execution took at least 17589 μs. Decrease the workload of String.replaceSubrange.RepChar by a factor of 32 (100), to be less than 1000 μs.

⚠⏱
String.replaceSubrange.RepChar.Small execution took at least 2589 μs. Decrease the workload of String.replaceSubrange.RepChar.Small by a factor of 4 (10), to be less than 1000 μs.

⚠⏱
String.replaceSubrange.Substring execution took at least 1047 μs. Decrease the workload of String.replaceSubrange.Substring by a factor of 2 (10), to be less than 1000 μs.

@milseman If you don't foresee an order of magnitude improvement in the performance of replaceSubrange for the fast cases (String, Substring, …) I'd say we should go with the same multiplier for the whole family. It looks like something in 500—1000 range would work fine based on the report above, with RepChar jumping above 1000μs, which is still fine so that we can have direct comparison between all the cases.
Otherwise he should go with your recommendation from before to:

… refactor this to a generic @inline(__always) implementation function that takes a scale factor (because the String version should be much faster than the Repeat version) and does the loop and replaceSubrange calls.

If I understand the point correctly, inlined function will allow the compiler to unroll the loop, which would not be the case if the loop multiplier was passed as parameter to non-inlined generic function? (I don't think we'd need to create per-case functions, as your next sentence said, because the inline closures play the same role and there is nowhere they can get inlined into… I think the ritualistic way we sprinkle @inline(never) is obsolete there.)

Same multiplier sounds good to me if we can make all the benchmarks fit in our time windows

@swift-ci please benchmark

@swift-ci please benchmark

@swift-ci please smoke test

@swift-ci please smoke test

Performance: -O

Regression
OLD
NEW
DELTA
RATIO

SuffixSequence
293
326
+11.3%
0.90x (?)

SuffixSequenceLazy
293
326
+11.3%
0.90x (?)

Chars2
3100
3350
+8.1%
0.93x (?)

Improvement
OLD
NEW
DELTA
RATIO

FlattenListLoop
2829
2170
-23.3%
1.30x (?)

FlattenListFlatMap
5301
4407
-16.9%
1.20x (?)

Added
MIN
MAX
MEAN
MAX_RSS

String.replaceSubrange.ArrChar
72
72
72
—

String.replaceSubrange.ArrChar.Small
57
57
57
—

String.replaceSubrange.RepChar
1775
2091
1881
—

String.replaceSubrange.RepChar.Small
267
267
267
—

String.replaceSubrange.String
53
53
53
—

String.replaceSubrange.String.Small
60
60
60
—

String.replaceSubrange.Substring
118
118
118
—

String.replaceSubrange.Substring.Small
70
70
70
—

Code size: -O
Performance: -Osize

Improvement
OLD
NEW
DELTA
RATIO

Dictionary4
204
166
-18.6%
1.23x

CharacterLiteralsLarge
67
58
-13.4%
1.16x (?)

Dictionary4OfObjects
351
328
-6.6%
1.07x (?)

Added
MIN
MAX
MEAN
MAX_RSS

String.replaceSubrange.ArrChar
71
73
72
—

String.replaceSubrange.ArrChar.Small
56
56
56
—

String.replaceSubrange.RepChar
1787
1998
1862
—

String.replaceSubrange.RepChar.Small
262
263
263
—

String.replaceSubrange.String
49
49
49
—

String.replaceSubrange.String.Small
57
57
57
—

String.replaceSubrange.Substring
112
112
112
—

String.replaceSubrange.Substring.Small
65
66
65
—

Code size: -Osize
Performance: -Onone

Added
MIN
MAX
MEAN
MAX_RSS

String.replaceSubrange.ArrChar
99
101
100
—

String.replaceSubrange.ArrChar.Small
79
81
80
—

String.replaceSubrange.RepChar
1793
1969
1853
—

String.replaceSubrange.RepChar.Small
275
275
275
—

String.replaceSubrange.String
51
51
51
—

String.replaceSubrange.String.Small
59
61
60
—

String.replaceSubrange.Substring
117
117
117
—

String.replaceSubrange.Substring.Small
70
72
71
—

Code size: -swiftlibs

✅
Benchmark Check Report

⚠⏱
String.replaceSubrange.RepChar execution took at least 1736 μs.  Decrease the workload of String.replaceSubrange.RepChar by a factor of 2 (10), to be less than 1000 μs.

How to read the data
The tables contain differences in performance which are larger than 8% and
differences in code size which are larger than 1%.
If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.
Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac mini
  Model Identifier: Macmini8,1
  Processor Name: Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

@keitaito Thank you for your patience and your contribution!

Woot! Thank you Pavol for updating the multiplier for me, and thank you for merging the PR! I really appreciate both Pavol and Michael that you patiently and carefully gave me reviews and feedback on my PR. Sorry for taking a long time to get it merged, but I'm happy and excited it's finally merged 🙂 I learned very interesting things under the hood of Swift standard library and String APIs through working on it. Thank you so much!

I have a question for @milseman about pre-specializations.

Benchmarking a non-pre-specialized argument type helps identify and track changes in the fully-generic implementation.

Does this mean that if @_specialize(where C == Repeated<Character>) is added to replaceSubrange(_:with:), we could see performance improvement for it when the argument is of type Repeated<Character>? Is there any specific reason the pre-specializations annotation is not added unlike String, Substring, and Array<Character> right now?

Another question: would you mind explaining what's the criteria for choosing @inline(never) vs @inline(__always) annotations? According to Bruno's blog post and Slava's explanation on Swift mailing list, it seems these work like the following:

If @inline(never) is used for the given function, the function won't be inlined. In other words, the function won't be copied to the call site. There could be function call overhead.
If @inline(__always) is used for the given function, the function will be inlined at the call site. No function call overhead, but if the function is called from multiple call sites, there will be code duplications, and the binary size will increase.

Given these, could inlining affect benchmark performance? Looking at benchmark source code files, it seems @inline(__always) usage is much less than @inline(never). What kind of function could be annotated with @inline(__always)?

The ritualistic placement of @inline(never) on the tested function predates the public history of  Swift Benchmark Suite. I can only guess that it stemmed from some very early internal version of the benchmark where it could have been inlined into the measurement loop? AFAIK it has no practical effect, because the individual benchmark functions are always executed indirectly through a function reference stored in a dictionary – there’s nowhere these functions can be inlined into as far as compiler can see.
For a more targeted use of @inline(never) see DataBenchmarks where it is used to explicitly control the inlining into the runFunction closures to create 2 different variants of benchmarks to showcase the effect of their (Data) inlining. (But frankly I’m not 100% positive I got all that correctly – AFAIK Data family of benchmarks is first one to deal explicitly with that aspect.)
For an example of technically correct @inline(__always) use, see InsertCharacter – where it ensures that the multiple benchmark functions are testing the same thing. But that pattern is not worth emulating, because the same effect can be achieved by leaving out all the annotations and calling the benchmark function with varying parameters from runFunction closure.
So I don’t see a very good reason to use @inline(__always) in context of benchmark definitions. If you were asking generally, see all occurrences of this annotation in stdlib.

@keitaito If you’re interested in playing some more with this, I think it should be possible and even beneficial — to prevent further confusion — to remove most of the @inline(never) annotations from Swift Benchmark Suite. Another starter task?


[Feature Request] Device rotation

We would like to have a way to change the device rotation for our flows

Somewhat related to #565

Hey! could you please clarify this feature request?

Do you want a Maestro command rotate that would rotate the device? Caveat: it would not work on physical devices. I know it's easy to do on Android emulator, using emulator console:

rotating AVD from shell
```
$ telnet localhost 5554
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Android Console: Authentication required
Android Console: type 'auth <auth_token>' to authenticate
Android Console: you can find your <auth_token> in
'/Users/bartek/.emulator_console_auth_token'
OK
auth uHnk/fBaIEhkA6jx
Android Console: type 'help' for a list of commands
OK
rotate 90
OK
rotate -90
OK
rotate -90
OK
rotate 90
OK
```

Docs: https://developer.android.com/studio/run/emulator-console

</details>

Or maybe you want Maestro Cloud to support this feature?  We don't want to start a flow with a certain orientation.
For example our app has a videoplayer and when you rotate your phone to landscape the fullscreen automatically activates and the player has some additional UI. When changing the orientation back the fullscreen player closes.
So we basically need something like:
- rotateHorizontal
and
- rotateVertical

Thank you for a very quick response. I see your use case now.
I did some more googling and maybe we can also change rotation of physical Android devices with adb. StackOverflow link
As for iOS, it seems much more restricted in this area. Couldn't find anything.
Would you OK with this feature being Android only?

I mean it would be awesome if you could do it with iOS too. But we are happy for anything in this direction - so only Android would be cool already

FWIW, in XCUITest it's possible to set the orientation with something like XCUIDevice.shared.orientation = .landscapeLeft. But I've only used that for setting initial orientation, not changing it mid-test, and I don't know how complex that would be to integrate that with Maestro.
(I would be happy with even being able to set initial orientation)
Of course, none of that really matters unless #565 is fixed...

hey @TheAlmightyBob, thanks for the pointer. I tried it out and it indeed works:
https://github.com/user-attachments/assets/037eebc9-6e62-440d-967e-9105a7653fcd
(link to the example app and test)
As for #565 - fix is on the way

I'm in need of this as well, and started a draft: https://github.com/mobile-dev-inc/maestro/compare/main...johntmcintosh:maestro:feature/set-orientation. I'll see if I can get this into a PR ready state next week, but posting the diff here in case anyone has initial feedback on the direction.


/like binds in maps are skewing ratings

Related to #45
Idea: use unbindKey(+, like) at the start of every map (or on a timer for all I care). Not sure that works though

@EsDeKa nice idea. I can unbind all keys bound to "like" and "dislike" commands at the start of every map, but what if some players binded it to easy like/dislike maps? They'll lose their binds.

You can't unbind those I think, I'm not sure you can even unbind binds from other resources, needs some testing

@EsDeKa wiki: unbindKey will only work on binds that were added by the same resource

Then the only solution I see is moving it to GUI for now until we have some kind of ACL

for all new maps, map manager can check if like is binded to + while testing map, and if yes he can deny it

New idea: from 1.5.2 on you can use https://wiki.multitheftauto.com/wiki/AddDebugHook to skip functions, looks like it might be doable with this


Unresolved reference: espresso in codelab Write Instrumentation Tests

URL of codelab
4 (Write Instrumentation Tests)
I am using the Tip Time app created in previous codelabs. When I run the test described in this codelab "Write Instrumentation Tests" android studio compiles the app but when I try to run it in the emulator it reports Unresolved reference: expressed
Versions
_Android Studio version: 2021.1.1 Bumblebee
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.test.ext:junit-ktx:1.1.3'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

I'm unable to reproduce this. Can you provide more information on how you are trying to run the test and what your test code looks like?

@FerdinandoCavaliere
Please provide the requested by @schordas information to proceed further. Unfortunately the issue will be closed within 7 days if there is no further update.


allergies: Use unsigned integers (close #374)

Fixes #374.
The indexOf function is still using int but I don’t know if it’s necessary to change that to uint.

The indexOf function is still using int but I don’t know if it’s necessary to change that to uint.

It is OK to leave it; it is not part of the external interface so it can do as it pleases.
Upon reviewing the implementation (which came long before my time)... I consider what it's doing a dirty trick. It's using the fact that 2 ** -1 = 0.5 which rounds to 0, and i & x > 0 will never be true. Seems to take a bit of thinking to realize why it does what it does, but that is a different item than what we are dealing with in this PR. I believe this PR has done the right thing.

Thanks!

You’re right, that trick works but either needs to be documented or changed to be something more intuitive. But that’s in the scope of a new issue/PR.
Thanks for merging.


Add Set Protocol TokenSets to Trust Wallet

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

[ x] Filename in the lowercase format
[ x] Image format: png
[ x] Image size: 256 by 256 px

Added here https://github.com/TrustWallet/tokens/commit/29ad2563efedd898c4b4f1c385da2a4593602a94
Also, you can use these graphics to say that your ERC20 token fully compatible with Trust Wallet (https://trustwallet.com/logo-assets). Tokens will show up automatically once the user receives them.
Feel free to share this on social media and tag Trust Wallet:

Twitter: @trustwalletapp

Facebook: @trustwalletapp


feat: Upgraded minimum required versions of AWS provider to 3.10

Related to #573 since VPC endpoint service_type became available in AWS provider version 3.10.

v2.70.0 has been just released.


treat non consecutive gaze / non-constant sample-rate

Description of the problem
the time series in a GazeDataFrame can be not consecutive, i.e. there are timesteps completely missing in the time series.
This is different from a time-consecutive timeseries with nans: there the sample-rate is constant and the missing timesteps have nan values.
So in the case I am referring to the timestep values would be something like [1001, 1002, 1003, 1004, 1114, 1115, 1161] where all data between timestep 1004 and 1114 is missing.
But now the problem is, when we apply something like pos2vel now, the signal time series does not reflect the missing values anymore, which will lead to artifacts.
Description of a solution
Instead, we should probably add some functionality to fill the missing timesteps with nan data.
In the previous example this kind of function would than add timesteps 1005 to 1113 with nan values.
We could additionally add events to the event data frame when doing this processing.
A first thing to do would be most definitely raising an error if we have data with non-constant sample-rate.

putting it right after checking the time column during initialization seems most reasonable to me.
https://github.com/aeye-lab/pymovements/blob/47e29b71f53a38e0c756f2a65e0232d53f8f9e66/src/pymovements/gaze/gaze_dataframe.py#L181-L184
creating a DataFrame df_missing with a single column time which holds all the missing timesteps and then using polars.DataFrame.merge_sorted to merge them could be an efficient way to achieve this.
Still it is necessary to group this iteration by the trial columns. Luckily we have them available by the lines before.
All upsampled values should simply be null for this first iteration, which should be possible by not having these columns in the df_missing DataFrame.

putting at the end of the GazeDataFrame.__init__() method should be perfectly fine too

after thinking a bit more about a solution I think it would be perfect to create a method GazeDataFrame.upsample() which gets a sampling rate.
then at the end of GazeDataFrame.__init__():
if upsample:
    self.upsample()

with upsample: bool = True as keyword argument for GazeDataFrame.__init__().

related to #405


Geyser extension fails to load

https://mclo.gs/LpVWcU2

update Geyser: https://github.com/zimzaza4/Geyser/actions/runs/9130166216


IITCm runs plugin scripts before main script

loadScripts (ingress-intel-total-conversion/mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java) builds this list of javascript to add for plugins, but appends the main IITC script at the end.
I'm not sure this needs to be fixed, but it's an unnecessary divergence from the desktop load order.

Load order is only important for the 'canvas-plugin' (must be loaded BEFORE the main script - initialize issues).
On Desktop the order is defined by installation order / users choice. You're free to move the main script to end be similar.

As we do have control over load order in IITCm, it makes sense to me to ensure that IITC itself is loaded first.
Also we should perhaps look at fixing the Canvas plugin so that it doesn't care about load order.

The canvas plugin may well be the reason for the ordering - there's not really any other way to enable it besides running it before IITC (or special-casing it as a setting rather than a script)
The commit which introduced this ordering #41e60d5 wasn't tied to a specific bug

there is no reason why the load order should be sorted in any way (except canvas-plugin).
Also there is no way to force users to sort their plugins in any way.
So why bother?

"because I know any number of scripts which assume this ordering, and it's confusing why they don't work on mobile", is really the main answer - and I recognize that's actually an argument for grandfathering ordering dependencies in practice.
"because I'd really like to override certain parts of IITC (and/or Leaftlet) before IITC actually boots"  is sort of a minor reason.
Possible "fix" would be to change the plugin boilerplate so it (generally) runs plugin.load() followed by plugin.boot() or something.
But I agree, fix not necessary.

Loading & initiation is always a critical part in any application. As said: iitc don't have any control about the load order. That is done by TamperMonkey or Greasemonky or... except in iitcm where it is fixed.
You still can do any monkey-patching in your 'setup' function.

code in the global scope will be execute while loading (that's your "plugin.load()")
Plugins-setup function is called after all plugins are loaded and most parts of the UI are initialized
Hook 'iitcLoaded' is called after boot finished.


How can we get  response time? Page metrics doesn't have it.

Steps to reproduce
Tell us about your environment:

Puppeteer version:
Platform / OS version:
URLs (if applicable):

What steps will reproduce the problem?
Please include code that reproduces the issue.

What is the expected result?
What happens instead?

Response of wat?
If you want to get response for example of https://example.com you should use page.tracing and then extract from tracing data what is interesting for you.
Here is example:
const puppeteer = require('puppeteer');
const fs = require('fs');

const getTimeFromMetrics = (metrics, name) => metrics.metrics.find(x => x.name === name).value * 1000;

(async () => {
    const browser = await puppeteer.launch();
    const page = await browser.newPage();

    await page.tracing.start({ path: 'trace.json' });
    await page.goto('https://example.com', { timeout: 60000 });

    const metrics = await page._client.send('Performance.getMetrics');
    const navigationStart = getTimeFromMetrics(metrics, 'NavigationStart');
    await page.tracing.stop();

    // --- extracting data from trace.json ---
    const tracing = JSON.parse(fs.readFileSync('./trace.json', 'utf8'));
    const htmlTracing = tracing.traceEvents.filter(x => (
        x.cat === 'devtools.timeline' &&
        typeof x.args.data !== 'undefined' &&
        typeof x.args.data.url !== 'undefined' &&
        x.args.data.url === 'https://example.com/'
    ));
    const HtmlResourceSendRequest = htmlTracing.find(x => x.name === 'ResourceSendRequest');
    const HtmlId = HtmlResourceSendRequest.args.data.requestId;
    const htmlTracingEnds = tracing.traceEvents.filter(x => (
        x.cat === 'devtools.timeline' &&
        typeof x.args.data !== 'undefined' &&
        typeof x.args.data.requestId !== 'undefined' &&
        x.args.data.requestId === HtmlId
    ));
    const HtmlResourceReceiveResponse = htmlTracingEnds.find(x => x.name === 'ResourceReceiveResponse');
    const HtmlResourceReceivedData = htmlTracingEnds.find(x => x.name === 'ResourceReceivedData');
    const HtmlResourceFinish = htmlTracingEnds.find(x => x.name === 'ResourceFinish');
    // --- end extracting data from trace.json ---

    await page.close();

    let results = [
        {
            variable: 'HtmlResourceReceiveResponse',
            value: HtmlResourceReceiveResponse.ts/1000 - navigationStart
        },
        {
            variable: 'HtmlResourceReceivedData',
            value: HtmlResourceReceivedData.ts/1000 - navigationStart
        },
        {
            variable: 'HtmlResourceSendRequest',
            value: HtmlResourceSendRequest.ts/1000 - navigationStart
        },
        {
            variable: 'HtmlResourceFinish',
            value: HtmlResourceFinish.ts/1000 - navigationStart
        },
    ];

    console.log(results);
})();

To your question on what response time? - i am trying to get what Performance.timing would show in a chrome browser. especially the response end and the domInteractive . I will look at your example and post any questions after my work today. Thank you for taking the time to respond!

In trace.json you will find domInteractive event.

Evaluate did the trick. @Everettss  Thanks  much.

Can someone please share the code to capture window.performance.timing as I am new to puppeteer... recently started exploring? tried as suggested by @Everettss but in vain. Thanks

@DrNBG you should use solution from this thread
const performance = JSON.parse(await page.evaluate(
   () => JSON.stringify(window.performance)
));

If you are looking for tutorial how to extract window.performance.timing with Puppeteer take a look at this article.

@Everettss,
Used the code as you shared. Works like a charm! The tutorial is helping me to understand various aspects.
Really appreciated.


v0.2 Release Checklist

This issue contains a list of close-out actions and administrative items. It pulls from https://github.com/drud/general/issues/3#issuecomment-291197831, which is a draft proposal for our release checklist.
Acceptance Criteria

[x] Review release (product owner)
[x] Approve release (product owner and release manager)
[ ] Create binaries (any DRUD maintainer)
[ ] Draft release notes (release manager)
[ ] Draft additional announcements for blog, newsletter, etc (not applicable at the moment)
[ ] Create release (release manager)

In the future, I will begin moving my reviews into the github release issues. Right now I have it in a private google doc https://docs.google.com/document/d/15A5C3hijadtVVLVYykmI27NmWssAHYhqAIijTfCo9NE/edit#. The TL;DR is that we're ready for a release.

Created/updated additional tickets as a result of the release review.

PR to update documentation.
Moved the WordPress post-import URL rewrite request to v0.3
Created a request to address enclosing folder file imports
Created a request to provide consistent ddev describe output

Also, there was a somewhat weird issue where an issue within drud/drupal8 configuration prevented import-db from detecting the file location. Tanner recommended removing the entire repo and starting over, which fixed it. Leaving that as a note here in case it re-surfaces and we want an audit trail.

@cyberswat Looks like it's good to go for final release. See checklist in the summary. Thanks!

🍾


ResolverListener doesn't refresh counter of ToRemove if response is successfull again.

A service is marked as lost even if it responds to a query ping before the last. The count that is compared to pingsUntilRemoved isn't refreshed if it responds again, the count just isn't increased. So if over its lifetime it doesn't respond pingsUntilRemoved-times to a query it gets marked as lost.
My suggestion would be that a host only gets marked as lost if it doesn't respond to pings n-times  successively and not in it's lifetime, or at least give that as a configuration option.

I ran into the same issue, and created a PR to fix it


Implement popular 7+ Taskbar Tweaker features

Implement some popular features of 7+ Taskbar Tweaker (7tt), like:

don't group pinned items (in taskbar)
associate an action to middle-clic on an item (close, etc.)
change action when hovering an item (show thumbnail, do nothing...)
etc.

7tt needs work every-time Windows gains a major update (like 1909 or 2004, or some big patches). I think Microsoft could integrate popular 7tt features into PowerToys and maintain them.
To be honest, these features should be integrated into Windows :-D

+1
Also the ability to hide the 'Show desktop' button so that the bottom right corner opens the notifications panel.

Also the ability to have "thiner" taskbar in vertical pos.?

@crutkas Is there any update when the idea will be considered?

@crutkas Is there any update when the idea will be considered?

Right now we have our current roadmap and what our next items we'll be focused on.  This item hasn't gotten a lot of votes in comparison to others.
https://github.com/microsoft/PowerToys/wiki/Roadmap

Right now we have our current roadmap and what our next items we'll be focused on.  This item hasn't gotten a lot of votes in comparison to others.
https://github.com/microsoft/PowerToys/wiki/Roadmap

it has 10 votes now.


Bolt for Windows uses incorrect interpreter path

Having installed bolt 1.10.0 on my Windows machine and added the bin folder to my path, I was unable to run bolt from my Git Bash shell. This was because all unix scripts had been set to an invalid interpreter:
C:/ProgramFiles64Folder/PuppetLabs/Bolt/bin/ruby.exe

Changing this (and all other script files in the directory) to:
C:\Progra~1\Puppet~1\Bolt\bin\ruby.exe

(corresponding with my bolt install path) fixed the issue. I was unable to use paths with spaces.

Closing as we don't (and would take a lot of effort) to support Git Bash.


Fix incorrect compare to {}

Description
error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.

I think this bug might lead to creating search blobs for empty trees.
Reviewer Guidance
People might expect summaries to not have such empty trees sometime in the future (not know that this bug happened), but such documents do exist, so I think maybe we need some extra testing and/or docs to make sure both cases are kept working long term? I'm not sure who should do that or how to do it.

I think this may be a dupe of #12936.

I think this may be a dupe of #12936.

Yes. We should merge one of these fixes. Given that mine is not conflicted, I suggest mine.
If someone also wants to delete this code because its unused, they can try and do that, and if they manage to actually do it this time before this gets reviewed and merged, then I'll be even happier.

I think this may be a dupe of #12936.

Yes. We should merge one of these fixes. Given that mine is not conflicted, I suggest mine.
If someone also wants to delete this code because its unused, they can try and do that, and if they manage to actually do it this time before this gets reviewed and merged, then I'll be even happier.

I briefly looked at removing the file altogether as Vlad suggested in my PR. As you might expect, that's a little more difficult than it sounds, and is technically a breaking change since we export the class. So let's merge this in, and I'll repurpose mine to deprecate stuff in main and remove it in next.


Spike: expect at most one CC build operation

I've triggered the following builds with parameters: -DenablePredictiveTestSelection=false for you. Click here to see all build failures.

Pull Request Feedback (Trigger)(Linux) (Check)

@bot-gradle test this on linux without pts

Superseded by https://github.com/gradle/gradle/pull/31047


Activating Open Collective

Hi, I'm making updates for Open Collective. Either you or a supporter signed this repo up for Open Collective. This pull request adds backers and sponsors from your Open Collective https://opencollective.com/awesome-persian-podcasts ❤
It adds two badges at the top to show the latest number of backers and sponsors. It also adds placeholders so that the avatar/logo of new backers/sponsors can automatically be shown without having to update your README.md. [more info]. See how it looks on this repo.
You can also add a "Donate" button to your website and automatically show your backers and sponsors there with our widgets. Have a look here: https://opencollective.com/widgets
P.S: As with any pull request, feel free to comment or suggest changes. The only thing "required" are the placeholders on the README because we believe it's important to acknowledge the people in your community that are contributing (financially or with code!).
Thank you for your great contribution to the open source community. You are awesome! 🙌
And welcome to the open collective community! 😊
Come chat with us in the #opensource channel on https://slack.opencollective.com - great place to ask questions and share best practices with other open source sustainers!

My apologies. All edits in English.

@monkeywithacupcake Hi! does the contributor's section update automatically?


Force Pixel Format

Fixes an issue with my install (possibly other linux users too?)
Installed libSDL-1.2 from the setup instructions listed on https://github.com/veandco/go-sdl2#requirements
Pixel format from window.getPixelFormat returned PIXELFORMAT_RGB888
screen looked like this:

(note the lack of cursor)
Forcing the pixel format:

@vonzimr Thank you for opening this PR!
I'm fairly new to SDL, so I'm not quite sure how pixel formats work, so I just have a few questions to understand:

Why shouldn't we use the pixel format of the window?
If we use another format for the textures, why ARGB8888 and not e.g. RGBA8888?
We always draw rectangles and the waveform without alpha, and we don't use any particular alpha value for characters, so why does it matter?

Also, I don't have a real M8 so I can't really say which output is correct. I simply assumed the original output was how it looked like (black background)

@vonzimr Thank you for opening this PR!
I'm fairly new to SDL, so I'm not quite sure how pixel formats work, so I just have a few questions to understand:

Why shouldn't we use the pixel format of the window?
If we use another format for the textures, why ARGB8888 and not e.g. RGBA8888?
We always draw rectangles and the waveform without alpha, and we don't use any particular alpha value for characters, so why does it matter?

Also, I don't have a real M8 so I can't really say which output is correct. I simply assumed the original output was how it looked like (black background)

@turbolent First off thank you for writing this software!
As to which output is correct, when discussing with trash80 he mentioned the cursor not being visible (which led me to poking at the source code).
Discussion here: https://discord.com/channels/709264126240620591/754193301292449844/800840817219600435
I believe you are in fact using an alpha when drawing text, which leads to this issue. For the waveform, there's nothing in front of / behind it when drawing so that appears correctly.
I first noticed the issue when removing the text drawing, where I saw the cursor. When enabling the text drawing again, it disappeared.
As for the reason why this works... I don't have a firm grasp with SDL and can't really find any resources that would explain it clearly. The only thing I can find is here:
https://rust-sdl2.github.io/rust-sdl2/sdl2/render/struct.TextureCreator.html (it's from the rust docs, I know, but seems to still apply)
The docs there explain:

You should prefer the default format if possible to have performance gains and to avoid unsupported Pixel Formats that can cause errors. However, be careful with the default PixelFormat if you want to create transparent textures.

As for choosing ARGB8888 over RGBA8888, I believe it has something to do with the byte order the data will be stored in. Not sure if it really matters too much here.

@turbolent First off thank you for writing this software!
As to which output is correct, when discussing with trash80 he mentioned the cursor not being visible (which led me to poking at the source code).
Discussion here: https://discord.com/channels/709264126240620591/754193301292449844/800840817219600435
I believe you are in fact using an alpha when drawing text, which leads to this issue. For the waveform, there's nothing in front of / behind it when drawing so that appears correctly.
I first noticed the issue when removing the text drawing, where I saw the cursor. When enabling the text drawing again, it disappeared.
As for the reason why this works... I don't have a firm grasp with SDL and can't really find any resources that would explain it clearly. The only thing I can find is here:
https://rust-sdl2.github.io/rust-sdl2/sdl2/render/struct.TextureCreator.html (it's from the rust docs, I know, but seems to still apply)
The docs there explain:

You should prefer the default format if possible to have performance gains and to avoid unsupported Pixel Formats that can cause errors. However, be careful with the default PixelFormat if you want to create transparent textures.

As for choosing ARGB8888 over RGBA8888, I believe it has something to do with the byte order the data will be stored in. Not sure if it really matters too much here.

Thank you for the detailed explanation, that really helped me understand the problem 👍
I remember seeing the cursor, but I think in one of the last commits I refactored the code to use two textures, one for the background and one for the characters, and that must have broken it.
Thanks again for fixing it!

Thank you for the detailed explanation, that really helped me understand the problem 👍
I remember seeing the cursor, but I think in one of the last commits I refactored the code to use two textures, one for the background and one for the characters, and that must have broken it.
Thanks again for fixing it!


Add note for when EventArgsConverter is required

Based on discussion at https://github.com/CommunityToolkit/Maui/issues/569

Docs Build status updates of commit b6fe50c:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/maui/behaviors/event-to-command-behavior.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

@mrlacey thank you for this contribution. I would like to investigate whether we really need the converter in the future but this really helps in the short term 😄

@jfversluis this should be good to merge if you can work your magic please :)

Docs Build status updates of commit 3c82fd7:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/maui/behaviors/event-to-command-behavior.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Doing magic! Thanks for this @mrlacey!


add support for multiple raw fif in maxfilter.py

ideally it should remap data to the same head position after estimating the best average head transformation
cc/ @LauriParkkonen idea :)

I'm going to go ahead and close this since hopefully we can start using our own Maxwell filtering routines


Compilation Error

I am trying to use your library in my project, however when adding:
implementation 'com.h6ah4i.android.widget.verticalseekbar:verticalseekbar:1.0.0'
Compilation fails and I receive the following issues:
error: resource android:attr/dialogCornerRadius not found.
error: resource android:attr/ttcIndex not found.
I am compiling using version 27 of Android. It doesn't seem that this issue should be happening. From researching myself it would seem my AppCompat should be out of date. However since you have support from Android 4 to Android 9, I don't think that should be an issue.
Please let me know if you have any suggestion or make any updates.
Thank you.

The same error I currently met. Need a solution.


Issue with Nested Schemas in OpenAPI generator

To Reproduce

Create a test.yaml with the following content

openapi: 3.0.3
info:
  title: Test API
  version: 0.0.1
paths:
  /v1/get-folder:
    get:
      tags: []
      summary: Get Folder
      operationId: GetFolder
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Folder'
  /v1/get-relation:
    get:
      tags: []
      summary: Get Relation Definition
      operationId: GetRelationDefinition
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelationDefinition'
components:
  schemas:
    RelationDefinition:
      type: object
      properties:
        name:
          type: string
          description: Name of the relation definition
        definition:
          $ref: '#/components/schemas/Folder'
    Folder:
      type: object
      properties:
        file:
          type: string
        folders:
          type: array
          items:
            $ref: '#/components/schemas/Folder'

Load the file to FumaDocs' generateFiles OpenAPI generator in a scripts/generate-docs.mjs file

import { generateFiles } from 'fumadocs-openapi';

void generateFiles({
  input: ['openapi/test.yaml'],
  output: '/content/api',
  per: 'operation',
})

run the script, you should get the following error:

/Users/some-project/node_modules/lodash/lodash.js:10612
      var memoized = function() {
                             ^

RangeError: Maximum call stack size exceeded
    at memoized (/Users/some-project/node_modules/lodash/lodash.js:10612:30)
    at /Users/some-project/node_modules/json-schema-to-typescript/dist/src/generator.js:256:104
    at Array.map (<anonymous>)
    at generateInterface (/Users/some-project/node_modules/json-schema-to-typescript/dist/src/generator.js:256:14)
    at generateRawType (/Users/some-project/node_modules/json-schema-to-typescript/dist/src/generator.js:151:20)
    at generateTypeUnmemoized (/Users/some-project/node_modules/json-schema-to-typescript/dist/src/generator.js:128:18)
    at memoized (/Users/some-project/node_modules/lodash/lodash.js:10620:27)
    at /Users/some-project/node_modules/json-schema-to-typescript/dist/src/generator.js:145:55
    at generateRawType (/Users/some-project/node_modules/json-schema-to-typescript/dist/src/generator.js:147:15)
    at generateTypeUnmemoized (/Users/some-project/node_modules/json-schema-to-typescript/dist/src/generator.js:128:18)

Node.js v18.18.0

Current vs. Expected behavior
Current behavior: Error!
Expected behavior: generation of a docs page from the OpenAPI file
Provide environment information
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 18.18.0
  npm: 9.8.1
  Yarn: 1.22.22
  pnpm: 8.12.0
Relevant Packages:
  next: 14.2.5 // Latest available version is detected (14.2.5).
  eslint-config-next: 14.2.5
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)
UI
Additional context
No response

Looks like an upstream problem from https://github.com/bcherny/json-schema-to-typescript/issues/482
I'll add an option to disable it as a temporarily fix


Cluster breaks when masters get new IPs from dhcpd

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Environment:

vSphere Cloud Provider

OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):

Linux 3.10.0-693.2.2.el7.x86_64 x86_64
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

Version of Ansible (ansible --version):
2.5.2

Kubespray version (commit) (git rev-parse --short HEAD):
d072babc
Network plugin used:
flannel
Anything else do we need to know:
The problem arose after our master VM got a new IP from dhcp.
There are hardcoded IP values inside:
$ grep <IP_ADDRESS> -r
manifests/kube-proxy.manifest:    - --bind-address=<IP_ADDRESS>
manifests/kube-apiserver.manifest:    - --advertise-address=<IP_ADDRESS>
openssl.conf:IP.1 = <IP_ADDRESS>
kubelet.env:KUBELET_ADDRESS="--address=<IP_ADDRESS> --node-ip=<IP_ADDRESS>"
admin.conf:    server: https://<IP_ADDRESS>:6443

This renders the cluster unavailable.

You would never use DHCPd for masters.


Fix No GPU server build

@GuanLuo can you have a look at the onnx change I made? I appears the string cuda copy check was always false.

@CoderHam  Did you check L0_build_variants with these changes?

@CoderHam Did you check L0_build_variants with these changes?

Yes, all tests except Build without stats collection pass. I have a fix for that on the gitlab side by turning TRITON_ENABLE_METRICS=OFF as it fails only because of this check:
https://github.com/NVIDIA/triton-inference-server/blob/master/build/CMakeLists.txt#L77-L79


[Event Request] Table 461 "Prepayment Inv. Line Buffer" - OnAfterIncrAmounts()

Please add a publisher event in function IncrAmounts like below.
procedure IncrAmounts(PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer")
begin
    Amount := Amount + PrepmtInvLineBuf.Amount;
    "Amount Incl. VAT" := "Amount Incl. VAT" + PrepmtInvLineBuf."Amount Incl. VAT";
    "VAT Amount" := "VAT Amount" + PrepmtInvLineBuf."VAT Amount";
    "VAT Base Amount" := "VAT Base Amount" + PrepmtInvLineBuf."VAT Base Amount";
    "Amount (ACY)" := "Amount (ACY)" + PrepmtInvLineBuf."Amount (ACY)";
    "VAT Amount (ACY)" := "VAT Amount (ACY)" + PrepmtInvLineBuf."VAT Amount (ACY)";
    "VAT Base Amount (ACY)" := "VAT Base Amount (ACY)" + PrepmtInvLineBuf."VAT Base Amount (ACY)";
    "VAT Difference" := "VAT Difference" + PrepmtInvLineBuf."VAT Difference";
    OnAfterIncrAmounts(Rec,PrepmtInvLineBuf); //<< New Publisher Event
end;

New Publisher Event

[IntegrationEvent(false,false)]
local procedure OnAfterIncrAmounts(var PrepaymentInvLineBuffer : record "Prepayment Inv. Line Buffer",PrepaymentInvLineBuffer2 : record "Prepayment Inv. Line Buffer")
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


181:admin_scan

Hello,
Thank you for your contribution, we are looking forward to seeing more contribution from you.
Best regards.


switching between CLN<->LND

I'm currently running version 1.8 with CLN.
Can I just switch to LND without loosing anything?
How would I do such switch?

You cant switch between lnd and cln... You gotta close channels and create a new node with lnd

@wchancao thank you for your reply.
I have no channels yet.
So I hoped someone could assure me the balance on my wallet will not be affected.
And if there are some commands or menu options to switch to LND without re-installing raspiblitz.

Then you dont have problems, what you gotta do is activate lnd, generate an onchain address within lnd and send all your sats to that lnd address from your cln onchain wallet, then you can deactivate cln. You dont have to reinstall raspiblitz


Allow returning an EmptyHashedRelation when a broadcast result is empty [databricks]

Signed-off-by: Alessandro Bellina<EMAIL_ADDRESS>Closes #4134.
The PR allows the broadcast exchange to produce an EmptyHashedRelation or an empty array in the case of the identity broadcast, in order for AQE's EliminateJoinToEmptyRelation rule to be able to optimize the plan. This changes q16 massively in the way we run things, but it lets us match what the CPU does.
In terms of performance, I ran this at 3TB and Q16 is now ~12 seconds which is slightly faster than the CPU (this is 3.5x faster than what we had before on the GPU). I don't see regressions with other queries.
One question I have for @revans2 and @jlowe is about: https://github.com/NVIDIA/spark-rapids/compare/branch-22.02...abellina:perf/empty_hash_relation?expand=1#diff-49cd95aa9e4a23cf1590cbd4c578511cb9cc2f5db81ade7dbe7152b0fe94c40eR50. I am not entirely sure if I should be using emptyBatch, or if you have other ideas.

Ok EliminateJoinToEmptyRelation changed in Spark 3.2 to EliminateUnnecessaryJoin and now it's looking at getRowCount from the Statistics object in the ShuffleExchangeExec it seems. This caught me off guard, I need to spend time on Spark 3.2 to understand if this is going to cause problems or how they are handling it now.

build

Note that: https://github.com/NVIDIA/spark-rapids/pull/4256/commits/f62167cd0818c3d7b59938dbc30912d855906ef8 adds isFoldableNonLitAllowed to the UnaryExprMeta. What @revans2 explained was (if I understand correctly) that an AQE rule that removes a join is likely running after constant folding, and therefore we are left with some unary expressions that didn't get folded.
That said I am not entirely sure yet of the order of things, so I am not 100% there yet.

That said I am not entirely sure yet of the order of things, so I am not 100% there yet.

I've been reading more about this and I think it makes sense now. Yes ConstantFolding isn't in the path after AQE removes the join because the ConstantFolding optimization happens for the basic logical plan optimizer (which happens early on), and not the AQEOptimizer. As far as I understand, once the plan is wrapped in an AdaptiveSparkPlanExec via InsertAdaptiveSparkPlan (from org.apache.spark.sql.executions.QueryExecution.preparations), the optimizer that includes ConstantFolding is not executed again, instead the optimizers used are the AQE optimizer (which only worries about Propagate Empty Relations,Dynamic Join Selection), and the canonicalizer  (CleanExpressions). @andygrove does this make sense?
Given the optimization, we are looking at the logicalLink of the plan wrapped in the adaptive exec, and then producing a new projection, which in  my case included a cast(null as bigint) (aka something that should have gotten folded to a literal). Nowadays, support for this should be available on the GPU, but we don't have test cases for it, so it is disabled by default.

build

build

build

This is broken in databricks:
  override def broadcastModeTransform(mode: BroadcastMode, rows: Array[InternalRow]): Any =
    mode.transform(rows, TaskContext.get.taskMemoryManager())

I was expecting to be able to transform the BroadcastMode, as spark does (https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/BroadcastExchangeExec.scala#L148), but it seems we need the task context.
I am looking into it further.

build

Thanks @jlowe, I believe I have addressed the comments

@revans2 this is ready for another look when you get a chance.

I've been reading more about this and I think it makes sense now. Yes ConstantFolding isn't in the path after AQE removes the join because the ConstantFolding optimization happens for the basic logical plan optimizer (which happens early on), and not the AQEOptimizer. As far as I understand, once the plan is wrapped in an AdaptiveSparkPlanExec via InsertAdaptiveSparkPlan (from org.apache.spark.sql.executions.QueryExecution.preparations), the optimizer that includes ConstantFolding is not executed again, instead the optimizers used are the AQE optimizer (which only worries about Propagate Empty Relations,Dynamic Join Selection), and the canonicalizer (CleanExpressions). @andygrove does this make sense?

Yes, that is correct. I ran some tests to confirm this.

build


Remove Rtools35 in Windows GHA tests - switch to Rtools40

Summary
As the title says, this switches to Rtools40 for Windows testing. Rtools35 has been obsolete for some time and is no longer supported.
Tests
/
Side Effects
/
Checklist

[x] Copyright holder: Rok Češnovar
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

[x] the basic tests are passing

unit tests pass (to run, use: ./runTests.py test/unit)
header checks pass, (make test-headers)
dependencies checks pass, (make test-math-dependencies)
docs build, (make doxygen)
code passes the built in C++ standards checks (make cpplint)

[x] the code is written in idiomatic C++ and changes are documented in the doxygen

[x] the new changes are tested

@serban-nicusor-toptal can you review this one when you have the chance?
This moves the GHA Windows tests to Rtools40. We, therefore, don't need the Jenkins Windows tests anymore as those are using Rtools40.

Ah, good call. Done.


No suitable driver found

Hello, I'm trying to setup a database connection using
    * def DbUtils = Java.type('util.DbUtils')
    * def config = { username: QC_DATABASE_Username, password: QC_DATABASE_Password, url: QC_DatabaseHostName_SID, driverClassName: 'oracle.jdbc.driver.OracleDriver'}
    * def db = new DbUtils(config);
    * def user = db.readRow("Select * from ssc_user where ds_email_1='email@example.com'");

I've already added the oracle driver to project dependencies. The DbUtils class is the same as the  dogs.feature example.
ERROR:
at ✽.* def user = db.readRow("Select * from ssc_user where ds_email_1='email@example.com'");(/src/test/java/features/users/users.feature:67)
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: No suitable driver found for QC_DatabaseHostName_SID

Karate:0.7.0

you have a mistake in your JSON I think:
* def config = { username: '#(QC_DATABASE_Username)', password: '#(QC_DATABASE_Password)', url: '#(QC_DatabaseHostName_SID)', driverClassName: 'oracle.jdbc.driver.OracleDriver' }

refer to the doc: https://github.com/intuit/karate#embedded-expressions

Solved, thank you. I have another issue related with string enclosing:
Exception:
Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT * FROM users where<EMAIL_ADDRESS>Code:
* def email =<EMAIL_ADDRESS>* def sample_user = db.readRows("SELECT * FROM users where ds_email_1=" + email)

How do I obtain SELECT * FROM users where<EMAIL_ADDRESS> I've already tried with '#(email)' without success. Thank you.

@ampc maybe you are missing single quotes ?
* def sample_user = db.readRows("SELECT * FROM users where ds_email_1='" + email + "'")

suggestion, for non-karate questions like this, please use StackOveflow, thanks: https://stackoverflow.com/questions/tagged/karate

Hi ampc.....can u please tell which oracle driver u have added to the project dependencies?

I think it was ojdbc14.
DeepikaSivakumar-Singtel<EMAIL_ADDRESS>escreveu no dia quarta,
10/06/2020 à(s) 03:23:

Hi ampc.....can u please tell which oracle driver u have added to the
project dependencies?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/intuit/karate/issues/340#issuecomment-641680303, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AACFR22UB63XA4FV5EL35CTRV3VBFANCNFSM4ETTF7EA
.

--
Cumprimentos,
António Carvalho


fix: link correct types for React adapter

Unlike other packages, react entry file is index.tsx (not index.mts). Therefore, the type file created by tsc will be index.d.ts instead of index.d.mts.
I fixed to handle .d.ts files correctly in the process of link type definitions.
Before submitting the PR, please make sure you do the following

[ ] It's really useful if your PR references an issue where it is discussed ahead of time.
[x] Prefix your PR title with [feat], [fix], [chore], or [docs].
[x] This message body should clearly illustrate what problems it solves.
[ ] Ideally, include a test that fails without this PR but passes with it.

Tests

[x] Run the tests with pnpm test and lint the project with pnpm lint

generator
If you change something in the generator, please also:

add some snapshot tests to the packages/generator/test/generator.test.ts-file
then run pnpm test => you should see your tests failing
run pnpm test:update-generated-files
again run pnpm test => your tests should pass
then add all the created *.expected.*-files to the git-index and
make sure these files look like you would expect them
finally commit these files to the repository

@itkrt2y thanks for your PR!
The fix was released in version 5.10.1


[WFLY-19927] & [WFLY-19928] Upgrade RESTEasy in WildFly and WildFly Preview

6.2.11.Final (WildFly)
Issue: https://issues.redhat.com/browse/WFLY-19927
Tag: https://github.com/resteasy/resteasy/releases/tag/6.2.11.Final
Diff: https://github.com/resteasy/resteasy/compare/6.2.10.Final...6.2.11.Final
7.0.0.Alpha4 (WildFly Preview)
Issue: https://issues.redhat.com/browse/WFLY-19928
Tag: https://github.com/resteasy/resteasy/releases/tag/7.0.0.Alpha4
Diff: https://github.com/resteasy/resteasy/compare/7.0.0.Alpha3...7.0.0.Alpha4

Thank you. I should have thought of tha.

Thanks @jamezp


Problems with ISR and latest Next version

Issue Description:
I am experiencing an issue with Next.js version 13.4.19 where I consistently encounter a Failed to load static props error while navigating to a page that utilizes getStaticPaths and getStaticProps. Here is the return code snippet for getStaticPaths (i am using ISR):
{
  paths: [],
  fallback: true,
}

Additional Context:

For a separate issue, I had to employ a workaround to address problems related to __NEXT_PRIVATE_PREBUNDLED_REACT.

I am using the conventional pages-based routing structure and not the new app directory feature.

Workarounds:

When I disable the fallback option in getStaticPaths, the error is resolved.
Downgrading to Next.js version 13.4.12 also resolves the issue.

Logs:
I am relatively new to SST/Open-Next and couldn't find any relevant logs in AWS CloudWatch to help diagnose the issue.

@marcantoineveilleux Please test using<EMAIL_ADDRESS>rc

@khuezy Works for me, thanks!


Support multiple Prompt

Use case:
Pop multiple models, while pressing 'back', the last model popped would be closed, every model component has its own  and there will be an warning called:
react_devtools_backend.js:6 Warning: A history supports only one prompt at a time

Will there be the support of multiple <Prompt />?

Nope, that wouldn't make much sense logically. You can only set one handler for onbeforeunloar anyways.


Hue RGB colors are broken in 0.66

Home Assistant release with the issue:
0.66.1
Last working Home Assistant release (if known):
0.65.6
Operating environment (Hass.io/Docker/Windows/etc.):
Hassbian - RPi3
Component/platform:
hue
Description of problem:
Calling turn_on with RGB parameters doesn't work
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
hue:

Additional information:
Call service light.turn_on with service data
{
"entity_id": "light.piano", "rgb_color": [75, 55, 22]
}
Light turns on but the attribute has rgb_color: 255,187,74

I think that's the expected behavior, the old way was just weird. If I understand correctly, color values are automatically scaled up to 255 now and you should use the brightness attribute to set the brightness, not the color attributes.

Hi,
I wanted to set the color, not the brightness.
How can I set the colors to [75, 55, 22] ?

{
  "entity_id": "...",
  "rgb_color": [255,187,74],
  "brightness": 75
}

I'm confused.
I was using
{
  "entity_id": "...",
  "rgb_color": [75,55,22],
  "brightness": 12
}

and get a certain color. Now if I call the same thing I get a different color (brightness is ok).

Same issue here. I try to use hs_color in my scenes but it doesn't work. Gives me a red-ish color every time. I can't find any documentation on the change either...

The intention now is that rgb_color will not adjust the brightness so you should see this behavior if the light was at full brightness when it was turned off.
The fix is to add a brightness where the value is the largest of the three rgb_color values:
{
  "entity_id": "...",
  "rgb_color": [75, 55, 22],
  "brightness": 75
}

(Otto's proposal works as well since the two different RGB colors are actually the same color at different brightness levels and brightness will override that difference.)
You can also use the new HS colors which I find more useful:
{
  "entity_id": "...",
  "hs_color": [37, 71],
  "brightness_pct": 30
}

cheers! @amelchio I get a different color on the actual bulb!

That's out of my league then as I do not have Hue lights. Maybe @armills can help more.
If the color is just slightly off, I guess it could be due to now using HS rather than xy with Hue.

Can you paste the full state attributes after you make that service call? Maybe there's a conversion problem.

{
"entity_id": "...",
"rgb_color": [75, 55, 22],
"brightness": 12
}
result of the call

I noticed the same, it also broke colour change of tradfri bulb paired with hue hub. Hue component is now converting rgb to hs and sending that to the hub. Previously it would send the colour to the hub as xy. I've had to manually changey hue component, my tradfri bulb works again and I now getting the same colours I was previously when specifying rgb values.

Possibly related to #13589


Unexpected negative quantity for transactions

When reading transactions in the blockchain, it appears that some "value" fields of transactions are decoded as negative, whereas this data is supposed to be positive.
I see in the code that you are aware of the problem in \Ethereum\DataType\EthQ::validate()
// @todo This might be wrong. We need to check for RLP.
// @see https://github.com/ethereum/wiki/wiki/RLP

Can you provide a example to test against?

Sure. You can try :
$tr = $eth->eth_getTransactionByHash(new EthD32("0x527e9b670536c09fe160b0c2e33728eadd7f8affae7803049fa8d8ec2d1c7cfe"));
echo $tr->value->val();

I currently outputs -493447593709551616 whereas the expected value is<PHONE_NUMBER>000000000.

@digitaldonkey I'm not sure I understand how the EthQ class is used for RLP decoding, so I don't feel comfortable providing a pull request for this one.
Do you have any hint on how to fix that ?

My current guess is that the block number is actually not a EthQ as it is not padded as far as I remember.
Looking into it now.

Yes I confirm that the block number is not padded, that's what I see in my tests with my Parity node.
And same thing for many other attributes (transaction value, nonce, gasPrice, gas, gasUsed, block difficulty, gasLimit,...).

Assuming that data types are implemented consistently was a very naive idea of mine ;)
My approach so far was to use the Library to make them consistent - independently from the actual client.

Fixed in dev branch now.

@digitaldonkey Nice, thank you !
That should do the trick. Can't wait to test it.


Q/A : onClick events fired by the Datepicker

First, thanks to all the contributors for the great work on this library, it's an amazing Datepicker !
I'm on a project with ag-grid trying to get the datepicker into a custom filter from this grid.
However, ag-grid is closing its filters listening to onClick events on document, and've consequently been trying to prevent onClicks from bubbling out of the datepicker.
(To prevent my whole filter from closing at any datepicker-related click)
But either I get the internal functionalities like prev/next Month to stop working (by a missplaced stopPropagation()), either an event is fired up to body. I'm starting to wonder if there is solution to achieve this from the outside of the component as the prev/next seems to rely on events getting to the top of the DOM.
Any clever thought on this would be appreciated !

@TanguyLe
 { e.stopPropagation(); }}><Datepicker />
?

@ljharb My bad, I was using the previous version with tether (which made those concerns harder to handle), the updates are making this much easier. Thanks for letting me realize that !


eureka.instance.prefer-ip-address javadoc has spelling error

Flag to say that, when guessing a hostname, the IP address of the server should be used in prference to the hostname reported by the OS.
here  prference  should be preference

this should be fixed by spring-cloud-netflix


Vega support

Hey, do you think it is possible to integrate vega into this? e.g. using this plugin
https://www.gatsbyjs.com/plugins/gatsby-remark-vega/
happy to tinker but not sure if those are even compatible

Hi, we have a config gatsbyRemarkPlugins, maybe you can add it as a custom option.
Another thing is that I don't use Gatsby anymore myself, so sorry I probably won't be adding extra features.. you can also fork it.


[Event Hubs] Event Batch Enhancements

Summary
The focus of these changes is to avoid paying the cost of serialization from EventData instances to AMQP messages multiple times, where possible.
Details
Previously, events were serialized to AMQP format when TryAdd was called for the EventDataBatch in order to measure the event size, and then the EventData instance was cloned and held in the batch.  When calling SendAsync, the events held by the batch were again serialized to AMQP format for each attempt at publishing; when retries were needed, the full serialization pass was made against all batch events.
This approach was used for two reasons.  First, the AMQP transport tracks delivery information on the serialized message directly and prevents messages from being sent twice; in error scenarios, attempts to retry sending were failing because of the transport behavior.  Additionally, when idempotent retries are enabled, the metadata for sequencing events must be applied as part of the send operation, preventing eager serialization and caching.
For mainline scenarios, the changes included herein work around the transport limitation by allowing previously serialized messages to be packaged in a new AMQP batch envelope for each attempt to publish.  The transport tracks delivery on the envelope, which is discarded in the event of retries and is rebuilt without needing to perform a full serialization pass over the batch events.  This removes the need to clone the source event in TryAdd and allows the batch to hold the serialized AMQP message, eliminating the need to perform serialization for batch events when SendAsync is called.
When idempotent retries are enabled, many of the benefits are negated; the idempotent metadata written to an event cannot be calculated eagerly and must be determined at the time SendAsync is called.  Because of this, the previous behavior of cloning EventData instances in TryAdd and holding those instances in the batch is retained.   Additionally, a full serialization pass over the batch attempts is neeed when SendAsync is called.  Some efficiency is gained in retry scenarios, as the previously serialized messages can be reused with a new AMQP envelope for each publishing attempt rather than performing a full serialization pass against the source events as had been previously done.
References and Related

Revisit the ability to cache AMQP messages when adding events to the AmqpEventBatch (#9569)

API change check for Azure.Messaging.EventHubs
API changes are not detected in this pull request for Azure.Messaging.EventHubs

@jsquire happy to look at it some time on the weekend. When do you need feedback the latest?

@jsquire happy to look at it some time on the weekend. When do you need feedback the latest?

Awesome!  I'd like to start running things through prolonged stress tests the week of the 18th.   Even if I end up closing this PR out get some burn in during nightly test runs before you get a chance to give it a look, I'd love to incorporate your feedback in another set of changes.

I was wondering if it would be possible to separate the payload from the metadata since the AmqpMessage allows getting the payload and then maybe it would be possible to reconstruct the AmqpMessage with the payload and fresh metadata. With that, you wouldn't have to pay the price of serializing the payload again and again on the idempotent path. But I'm not deep enough into all the mechanics here, so this might just be nonsensical gibberish what I'm writing here.

I'm not sure that I'm following.   I think what you're suggesting is to shift some of the logic for sequencing to the transport batch and manipulate it at the AMQP message level.    Something like:
// Producer.SendIdempotent

var publishingState = GetPublishingState(partitionId);

try
{
    var lastBatchSequenceNumber= batch.ApplyPublishingState(publishingState);

    await transportProducer.SendAsync(batch, ...);
    publishingState.LastSequenceNumber = lastBatchSequenceNumber;
}
catch
{
    batch.ResetPublishingState();
}

Where internally the batch would do something like:
public class Batch
{
    public long ApplyPublishingState(PartitionPublishingState state)
    {
        var sequenceNumber = GetNextSequenceNumber(state.LastSequenceNumber);

        foreach (var message in _batchMessages)
        {
              message.MessageAnnotations.Map[AmqpProperty.ProducerSequenceNumber] = sequenceNumber;
              sequenceNumber = GetNextSequenceNumber(sequenceNumber);

              message.MessageAnnotations.Map[AmqpProperty.ProducerGroupId] = stateProducerGroupId;
              message.MessageAnnotations.Map[AmqpProperty.ProducerOwnerLevel] = state.ProducerOwnerLevel;
        }
    }

    public long ResetPublishingState()
    {
        foreach (var message in _batchMessages)
        {
              message.MessageAnnotations.Map.TryRemoveValue<int?>(AmqpProperty.ProducerSequenceNumber, out _);
              message.MessageAnnotations.Map.TryRemoveValue<long?>(AmqpProperty.ProducerGroupId, out _);
              message.MessageAnnotations.Map.TryRemoveValue<short?>(AmqpProperty.ProducerOwnerLevel,  out _);
        }
    }
}

(I'd probably do that in the message converter, but close enough for illustration....)
Am I close?

Yep exactly. It was just a wild thought and I haven't validated if that would even work or give us much.

It was just a wild thought and I haven't validated if that would even work or give us much.

Not so wild; its a great suggestion that I didn't think of.   I refactored for this approach, which let me remove a lot of the idempotent-specific infrastructure.   I think it's a huge improvement to what was here.   Thanks!

/azp run net - eventhub - tests

This looks nice! :partying_face: :balloon:

Looking forward to seeing the impact of this change with some nice profiler screenshots :D


Update sample pipelines for Kubeflow 1.5 (KFP-Tekton 1.1.1)

Among other changes, timeout has non-0 values now
/cc @Tomcli @yhwang
Related https://github.com/IBM/manifests/pull/41

/lgtm
/approve


WIP: Armando/grwth 3028 decreasing the quantity on the buy modal causes the item to

I think this looks good, although curious if anything else using this selector has the same issue and if it should just be handled there. wdyt @ted-palmer ?

I think this looks good, although curious if anything else using this selector has the same issue and if it should just be handled there. wdyt @ted-palmer ?

The CartItem component has uses the selector and the bug wasn't occurring there. I think it was specific for the BuyModal, but now that I think about it, It might also be appearing on the Sweep and Mint.

Nope doesn't seem to be appearing there.

Sweet, let's keep it contained then to just the buy modal.


Unable to load SwaggerUI in Embedded architecture

We are running NR in Embedded architecture
Swagger UI does not load in NR editor.
The following error is printed to the Browser console:
GET http://localhost:1881/apihttp-api/swagger.json 404 (Not Found) Unable to load SwaggerUI
Please suggest how to solve that
Thanks!

What value of httpAdminRoot and httpNodeRoot are you passing in your settings to the runtime?

httpNodeRoot: '/api',
httpAdminRoot: '/red'

The the URL that 404s, it looks like a / is missing between api and http-api.
Try adding a trailing slash to these config properties:
httpNodeRoot: '/api/',
httpAdminRoot: '/red/'

This is something that red.js does which, as you're embedding, you're not benefiting from.

Thanks !!
This solves the problem !


Write a documentation about URL Shortner

Write an article about how the URL Shortner works in the background.
This article would be on Low Level System Design.
Do consider this issue under hacktoberfest.

Go for it. 👍

@origranot Kindly give this issue a label as "hacktoberfest"

Yes, I will label the PR 👍


Failed to convert to tensorrt

I follow the readme.md and try to concert yolov4.weight to tensorrt, but failed.
My environment : tensorrt7.0, cuda10.1, tensorflow2.1
log:
from tensorflow.python.compiler.tensorrt import trt_convert as trt
ImportError: cannot import name 'trt_convert'

try changing from tensorflow.python.compiler.tensorrt import trt_convert as trt to from tensorflow.contrib.tensorrt import trt_convert

@rose-jinyang import tensorflow.contrib.tensorrt as trt (used in ≤ TensorFlow 1.13.1 ) -->
from tensorflow.python.compiler.tensorrt import trt (TensorFlow ≥ 1.14.1)

Hello
How are you?
Could u write the environment and steps for converting to TensorRT model in README.
OS platform:
Tensorflow_gpu version:
TensorRT version:
The test script for TensorRT model:
Thanks.

@rose-jinyang import tensorflow.contrib.tensorrt as trt (used in ≤ TensorFlow 1.13.1 ) -->
from tensorflow.python.compiler.tensorrt import trt (TensorFlow ≥ 1.14.1)

from tensorflow.python.compiler.tensorrt import trt its giving me error no module name trt

It occurs if you trying this on Windows. Converting tf to tensorrt is only available in Linux.


Migrating Gradle files to Kotlin to simplify debugging

@tvainika the docs were just regenerated when other things were finalized. :)


Revert "CB-9902: Increase the default node count for the compute group to 1 in 7.2.1 templates"

Reverts hortonworks/cloudbreak#9599
Reverting to fix the commit message.

Thanks. Likewise; didn't pay attention to the original commit message. Thought a commit amend PR would fix it. It didn't.


chore: increase timeout for golangci-lint

Recently golangci-lint timeouts quite often, as suggested, increase the timeout to 5m.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.18%. Comparing base (bd2b403) to head (85d6cc2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1467      +/-   ##
==========================================
- Coverage   67.33%   67.18%   -0.15%
==========================================
  Files         194      194
  Lines       18354    18354
==========================================
- Hits        12359    12332      -27
- Misses       5325     5349      +24
- Partials      670      673       +3

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Not sure if this will fix it though, it doesn't seem to take that long when it is working correctly. (33s for this PR)


Migrate from Go Template to KCL for Crossplane compositions

Done through https://github.com/Smana/cloud-native-ref/pull/510


Supporting OESS 2+ as a backend

Created by Luis Marin Vera via monday.com integration. 🎉

The SDX Local Controller must support OESS's API to perform Topology Management activities as described in epic epic_topology. (Luis)


Current version doesn't display large charts, with x axis of type 'category'

The new C3 version doesn't display correctly the first line for charts having X axis of type 'category', also the X axis text values are not handled correctly.
This was OK in the previous C3 version. Please check:
Previous version, chart OK: http://gtplants.com/c3/c3ok.html
Error in new version: http://gtplants.com/c3/c3err.html
I suspect that the repeated X axis values might have something to do with it but is there any
reason why the X category values shouldn't be repeated? In this case this chart presents values each 10 minutes, over three days and displaying full dates wouldn't make sense...

I'm also interested in this issue, I mage a plunker in case it help pointing us the config mistake or the bug
https://plnkr.co/edit/ISVRmWiUSf6dD8XPvzPH?p=preview