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 Browser | |
CreationMutex = Mutex.new | |
def _create_monitor_synchronized | |
if ((not defined?(@monit)) or @monit.nil?) | |
CreationMutex.synchronize do | |
if ((not defined?(@monit)) or @monit.nil?) | |
puts "Thread #{Thread.current.object_id} created @monit" | |
@monit = Object.new | |
@monit.extend(MonitorMixin) | |
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
require 'monitor' | |
class Semaphore | |
def initialize(maxval = nil) | |
maxval = maxval.to_i unless maxval.nil? | |
raise ArgumentError.new("Semaphores must use a positive maximum value or have no maximum!") if maxval and maxval <= 0 | |
@max = maxval || -1 | |
@count = 0 | |
@mon = Monitor.new | |
@dwait = @mon.new_cond | |
@uwait = @mon.new_cond |
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
public final class PrescreenedAction extends Action<Prescreen>{ | |
@Override | |
public final Promise<SimpleResult> call(final Context context) throws Throwable { | |
final Promise<Result> screened = AccentureController.prescreenActiveSession(context.request()); | |
if (screened != null){ | |
return screened.flatMap(new Function<Result, Promise<SimpleResult>>(){ | |
@Override | |
public final Promise<SimpleResult> apply(final Result result) throws Throwable { | |
return Promise.wrap(result.getWrappedResult()).flatMap(new Function<play.api.mvc.SimpleResult,Promise<SimpleResult>>(){ |
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
package org.scalafmt.sbt | |
import sbt.Keys._ | |
import sbt._ | |
import sbt.{IntegrationTest => It} | |
object ScalafmtIncrementalPlugin extends AutoPlugin { | |
override def requires: Plugins = ScalafmtPlugin | |
override def trigger: PluginTrigger = allRequirements | |
object autoImport { |
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
[ | |
{ | |
"jmhVersion" : "1.20", | |
"benchmark" : "io.prestosql.execution.buffer.BenchmarkPagesSerde.deserialize", | |
"mode" : "thrpt", | |
"threads" : 1, | |
"forks" : 1, | |
"jvm" : "/local/home/pettja/.sdkman/candidates/java/11.0.8-amzn/bin/java", | |
"jvmArgs" : [ | |
"-Xms4g", |
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
[ | |
{ | |
"jmhVersion" : "1.20", | |
"benchmark" : "com.facebook.presto.operator.BenchmarkGroupedTopNBuilder.topN", | |
"mode" : "thrpt", | |
"threads" : 1, | |
"forks" : 1, | |
"jvm" : "/local/home/pettja/.sdkman/candidates/java/8.0.265-amzn/jre/bin/java", | |
"jvmArgs" : [ | |
"-Xmx8G", |
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
[ | |
{ | |
"jmhVersion" : "1.20", | |
"benchmark" : "io.trino.operator.aggregation.BenchmarkDecimalAggregation.benchmark", | |
"mode" : "avgt", | |
"threads" : 1, | |
"forks" : 1, | |
"jvm" : "/local/home/pettja/.sdkman/candidates/java/11.0.12-zulu/bin/java", | |
"jvmArgs" : [ | |
"-Xms8g", |
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
[ | |
{ | |
"jmhVersion" : "1.20", | |
"benchmark" : "io.trino.operator.join.BenchmarkHashBuildAndJoinOperators.benchmarkJoinHash", | |
"mode" : "avgt", | |
"threads" : 1, | |
"forks" : 1, | |
"jvm" : "/local/home/pettja/.sdkman/candidates/java/11.0.12-zulu/bin/java", | |
"jvmArgs" : [ | |
"-Xms8g", |
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
[ | |
{ | |
"jmhVersion" : "1.20", | |
"benchmark" : "com.facebook.presto.operator.BenchmarkGroupByHash.benchmarkHashPosition", | |
"mode" : "avgt", | |
"threads" : 1, | |
"forks" : 1, | |
"jvm" : "/local/home/pettja/.sdkman/candidates/java/8.0.265-amzn/jre/bin/java", | |
"jvmArgs" : [ | |
"-Xms8g", |
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
[ | |
{ | |
"jmhVersion" : "1.20", | |
"benchmark" : "io.trino.operator.BenchmarkHashAndStreamingAggregationOperators.benchmark", | |
"mode" : "avgt", | |
"threads" : 1, | |
"forks" : 1, | |
"jvm" : "/local/home/pettja/.sdkman/candidates/java/11.0.12-zulu/bin/java", | |
"jvmArgs" : [ | |
"-Xms8g", |
OlderNewer