Skip to content

Commit

Permalink
Fixed issue where read annotations were not inherited
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBakerEffendi committed Aug 21, 2024
1 parent 6eed1e4 commit 6ab4ce3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,33 +1,16 @@
package com.github.plume.oss.benchmarking

import com.github.plume.oss
import com.github.plume.oss.{Benchmark, JimpleAst2Database, PlumeConfig, TinkerGraphConfig}
import com.github.plume.oss.drivers.{IDriver, TinkerGraphDriver}
import com.github.plume.oss.{Benchmark, JimpleAst2Database, PlumeConfig, TinkerGraphConfig}
import io.joern.jimple2cpg.Config
import io.shiftleft.codepropertygraph.generated.{NodeTypes, PropertyNames}
import org.openjdk.jmh.annotations.{
Benchmark,
Level,
Measurement,
OutputTimeUnit,
Param,
Scope,
Setup,
State,
TearDown,
Timeout,
Warmup
}
import org.openjdk.jmh.annotations.*
import org.openjdk.jmh.infra.{BenchmarkParams, Blackhole}

import java.util.concurrent.TimeUnit
import scala.compiletime.uninitialized

@State(Scope.Benchmark)
@Timeout(5, TimeUnit.MINUTES)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Measurement(iterations = 3, time = 5, timeUnit = TimeUnit.SECONDS)
@Warmup(iterations = 1, time = 1, timeUnit = TimeUnit.SECONDS)
trait GraphReadBenchmark {

@Param(Array(""))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ import io.shiftleft.codepropertygraph.generated.EdgeTypes.AST
import io.shiftleft.codepropertygraph.generated.NodeTypes.{CALL, METHOD}
import io.shiftleft.codepropertygraph.generated.PropertyNames.{FULL_NAME, ORDER}
import org.neo4j.graphdb.GraphDatabaseService
import org.openjdk.jmh.annotations.{Benchmark, Scope, Setup, State}
import org.openjdk.jmh.annotations.{Benchmark, Measurement, OutputTimeUnit, Scope, Setup, State, Timeout, Warmup}
import org.openjdk.jmh.infra.{BenchmarkParams, Blackhole}
import overflowdb.traversal.*

import java.util
import java.util.concurrent.TimeUnit
import scala.compiletime.uninitialized
import scala.jdk.CollectionConverters.*
import scala.util.{Random, Using}

@State(Scope.Benchmark)
@Timeout(5, TimeUnit.MINUTES)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Measurement(iterations = 3, time = 5, timeUnit = TimeUnit.SECONDS)
@Warmup(iterations = 1, time = 1, timeUnit = TimeUnit.SECONDS)
class Neo4jEmbedReadBenchmark extends GraphReadBenchmark {

private var g: GraphDatabaseService = uninitialized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@ import io.shiftleft.codepropertygraph.generated.Cpg
import io.shiftleft.codepropertygraph.generated.EdgeTypes.AST
import io.shiftleft.codepropertygraph.generated.PropertyNames.ORDER
import io.shiftleft.codepropertygraph.generated.nodes.{Call, StoredNode}
import org.openjdk.jmh.annotations.{Benchmark, Scope, Setup, State}
import org.openjdk.jmh.annotations.{Benchmark, Measurement, OutputTimeUnit, Scope, Setup, State, Timeout, Warmup}
import org.openjdk.jmh.infra.{BenchmarkParams, Blackhole}
import overflowdb.PropertyKey
import overflowdb.traversal.*

import scala.compiletime.uninitialized
import scala.util.Random
import io.shiftleft.semanticcpg.language.*

import java.util.concurrent.TimeUnit

@State(Scope.Benchmark)
@Timeout(5, TimeUnit.MINUTES)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Measurement(iterations = 3, time = 5, timeUnit = TimeUnit.SECONDS)
@Warmup(iterations = 1, time = 1, timeUnit = TimeUnit.SECONDS)
class OverflowDbReadBenchmark extends GraphReadBenchmark {

private var cpg: Cpg = uninitialized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ import org.openjdk.jmh.annotations.*
import org.openjdk.jmh.infra.{BenchmarkParams, Blackhole}
import overflowdb.traversal.*

import java.util.concurrent.TimeUnit
import scala.compiletime.uninitialized
import scala.jdk.CollectionConverters.*
import scala.util.Random

@State(Scope.Benchmark)
@Timeout(5, TimeUnit.MINUTES)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Measurement(iterations = 3, time = 5, timeUnit = TimeUnit.SECONDS)
@Warmup(iterations = 1, time = 1, timeUnit = TimeUnit.SECONDS)
class TinkerGraphReadBenchmark extends GraphReadBenchmark {

private var g: () => GraphTraversalSource = uninitialized
Expand Down

0 comments on commit 6ab4ce3

Please sign in to comment.