This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: Recompile with -Xlint:deprecation for details. | |
Compiling com.oracle.truffle.llvm.parser with javac-daemon(JDK 1.8)... [dependency TRUFFLE_DSL_PROCESSOR updated] | |
Compiling com.oracle.truffle.llvm.tests.types with javac-daemon(JDK 1.8)... [dependency com.oracle.truffle.llvm.runtime updated] | |
Compiling com.oracle.truffle.llvm.asm.amd64 with javac-daemon(JDK 1.8)... [dependency TRUFFLE_DSL_PROCESSOR updated] | |
Compiling com.oracle.truffle.llvm.tests.tck with javac-daemon(JDK 1.8)... [dependency com.oracle.truffle.llvm.runtime updated] | |
Compiling com.oracle.truffle.llvm with javac-daemon(JDK 1.8)... [dependency TRUFFLE_DSL_PROCESSOR updated] | |
Compiling com.oracle.truffle.llvm.parser.factories with javac-daemon(JDK 1.8)... [dependency TRUFFLE_DSL_PROCESSOR updated] | |
Compiling com.oracle.truffle.llvm.tools with javac-daemon(JDK 1.8)... [dependency com.oracle.truffle.llvm.parser updated] | |
Compiling com.oracle.truffle.api.debug.test with javac-daemon(JDK 1.8)... [dependency TRUFFLE_DSL_PROCESSOR updated] | |
Compiling com. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# ruby ./bench.rb "wrk -c20 -t20 -d3m http://localhost:9292/request" "c20t20-jvm.dat" | |
PARSE_RPS = proc do |out| | |
begin | |
out.match(/Requests\/sec: (?<value>.*)/)[:value].gsub!(" ", "").to_f | |
rescue | |
puts "Wrong RPS parsing" | |
0 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2020-09-28 17:27:26 | |
Full thread dump OpenJDK 64-Bit Server VM GraalVM 20.3.0-dev (25.262-b10-jvmci-20.2-b03 mixed mode): | |
"RMI TCP Connection(24)-127.0.0.1" #96 daemon prio=9 os_prio=35 tid=0x00007facedb07000 nid=0x15307 runnable [0x00007000084e6000] | |
java.lang.Thread.State: RUNNABLE | |
at java.net.SocketInputStream.socketRead0(Native Method) | |
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) | |
at java.net.SocketInputStream.read(SocketInputStream.java:171) | |
at java.net.SocketInputStream.read(SocketInputStream.java:141) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# jt -u jvm-ce benchmark -e 'string = "a:" * 500_000; benchmark { string.split(":") }' | |
1.2712554515493182 | |
2.160920504253029 | |
17.192892688457704 | |
61.5012920434102 | |
77.74676398417816 | |
82.08563672136926 | |
79.00306258772991 | |
84.1567876139306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEFORE | |
a = [3.4451130582146683, 2.385918036922338, 3.920855700632015, 3.0578235878124937, 3.271109578119808, 3.519938062594423, 4.305462705034818, 7.640309888410083, 14.50009541439279, 17.851173279258877, 23.13733295712934, 25.399894868389243, 31.89767820906181, 35.66439549792595, 38.34925941530993, 51.29713457630357, 48.615074490851136, 65.08395637220634, 66.71744986808874, 89.05259814856443, 147.8499320606563, 146.41336775698494, 143.08515128540077, 51.96651916208329, 84.22716230396696, 119.62053614458786, 194.3913705238899, 194.07621178387902, 190.16402274184753, 198.08630220621285, 197.17463918236777, 196.4103623421654, 198.29562080680807, 197.91679854857313, 199.1664459648101, 213.9895304973666, 207.77618851733104, 203.31423277162023, 207.1514110171403, 214.15764801111686, 220.5416495102144, 214.79462244510745, 214.47394130181567, 218.4967400419493, 208.95625260737273, 217.40902017791666, 213.76752190032394, 216.33557284412575, 216.8346198710945, 216.29988270075725, 47.35177910367706, 114.431711619746 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseMutation < GraphQL::Schema::RelayClassicMutation | |
include Graphql::ResolverCallbacks | |
include ActionPolicy::GraphQL::Behaviour | |
def current_user | |
context[:current_user] | |
end | |
# Enforce mutation authorization. | |
# This callbacks verifies that `authorize!` method has been |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def preload_association(records) | |
::ActiveRecord::Associations::Preloader.new.preload( | |
records, | |
@association_schema, | |
@preload_scope | |
).then(&:first).then do |preloader| | |
next unless @preload_scope | |
# The result of previous preload is memoized, ActiveRecord won't load this association again. | |
if preloader.is_a?(::ActiveRecord::Associations::Preloader::AlreadyLoaded) | |
owner = preloader.send(:owners).first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Filters | |
class Base | |
attr_reader :scope | |
def initialize(scope) | |
@scope = scope | |
end | |
end | |
class ByPrice < Base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://github.com/StanfordSNR/gg/blob/master/docker/README.md | |
# install deps | |
apt-get install -y ruby bison | |
# clone Ruby | |
git clone --single-branch --branch ruby_2_6 https://github.com/ruby/ruby.git | |
cd ruby | |
# build configuration files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pry' | |
Record = Struct.new(:id, :level_1, :level_2) | |
class Tree | |
class Node | |
def initialize(object, records, behavior) | |
@object = object | |
@records = records | |
@behavior = behavior |
NewerOlder