Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjurney/1008760 to your computer and use it in GitHub Desktop.
Save rjurney/1008760 to your computer and use it in GitHub Desktop.
Testing Pacer's subgraph with profiler
tinkergraph[vertices:317 edges:11520]
main thread profile results:
Total time: 55.92
total self children calls method
----------------------------------------------------------------
46.08 0.00 46.08 1 Pacer::Core::Graph::ElementRoute#subgraph
46.08 0.00 46.08 1 Pacer::Routes::PathsRoute#subgraph
46.08 0.00 46.08 1 Pacer::Routes::BulkOperations#bulk_job
46.08 0.00 46.08 1 Enumerable#each_slice
44.14 0.19 43.95 243851 Array#each
43.08 0.00 43.08 3 Pacer::ManagedTransactionsMixin#managed_manual_transaction
43.08 0.00 43.08 3 Pacer::GraphTransactionsStub#manual_transaction
43.08 0.00 43.08 3 Pacer::ManagedTransactionsMixin#unmanaged_transactions
41.23 0.00 41.23 2 Pacer::Core::Route#each_path
38.91 0.11 38.81 23689 Pacer::Route#each
37.78 0.35 37.42 23687 Pacer::Core::Route#each_element
33.14 13.09 20.05 151691 Java::ComTinkerpopPipes::AbstractPipe#next
17.94 0.38 17.56 57600 Pacer::Pipes::TypeFilterPipe#processNextStart
17.73 0.18 17.55 117130 Pacer::Pipes::EnumerablePipe#processNextStart
17.43 0.22 17.21 117130 Enumerable::Enumerator#next
17.38 0.18 17.20 115200 Java::ComTinkerpopPipes::AbstractPipe#hasNext
16.11 16.05 0.06 94120 Kernel#raise
8.76 0.10 8.67 117130 Generator::Indexed#next
8.67 0.18 8.48 117130 Generator::Indexed#current
7.10 0.11 6.99 294997 Class#new
5.65 0.33 5.33 37157 Pacer::Route#initialize
5.56 0.71 4.85 232980 Proc#call
4.62 0.25 4.36 204485 Kernel#send
4.11 0.35 3.76 96727 Java::JavaUtil::Collection#each
3.94 0.01 3.93 731 Kernel#require
3.64 0.00 3.64 1 GraphClient#get
3.63 0.05 3.58 24341 Pacer::Core::Route#chain_route
3.07 0.00 3.07 2 GraphClient#return_graph
3.07 0.00 3.07 2 Pacer::GraphMixin#from_json
2.72 0.03 2.69 11530 Enumerable#collect
2.68 0.23 2.45 11520 Pacer::EdgeMixin#clone_into
2.59 0.22 2.37 2 Hash#each_pair
2.42 0.00 2.42 330 Kernel#require
2.26 2.23 0.03 11546 Kernel#method_missing
2.23 0.10 2.13 11520 Pacer::Core::Graph::MixedRoute#e
2.12 0.00 2.12 1 Pacer::Core::Graph::ElementRoute#result
2.12 0.00 2.11
require 'graph_client'
require 'pacer'
client = GraphClient.new
k = 16
graph = client.get "louise.kitchen@enron.com"
k_nodes = graph.v.filter{|v| v.out_e.count > k}.result
subgraph = k_nodes.out_e.in_v.only(k_nodes).subgraph
puts subgraph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment