Skip to content

Commit

Permalink
benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
skatkov committed Nov 8, 2023
1 parent 068bd8a commit 8a43593
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions benchmark/bench.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

gem 'activesupport', '~> 7.0.4'
gem 'actionview', '~> 7.0.4'
gem 'activemodel', '~> 7.0.4'
gem 'actionpack', '~> 7.0.4'
gem 'google-protobuf'
gem 'pbbuilder', path: '../'
end
Expand All @@ -14,8 +16,11 @@
require 'active_support'
require 'action_view'
require 'action_view/testing/resolvers'
require 'action_view/test_case'
require 'google/protobuf'
require 'pbbuilder'
require 'active_model'
require 'action_controller'

Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("pbbuilder.proto", syntax: :proto3) do
Expand All @@ -24,7 +29,6 @@
repeated :friends, :message, 2, "pbbuildertest.Person"
optional :best_friend, :message, 3, "pbbuildertest.Person"
repeated :nicknames, :string, 4
optional :field_mask, :message, 5, "google.protobuf.FieldMask"
map :favourite_foods, :string, :string, 6
repeated :tags, :string, 7
optional :last_name, :string, 8
Expand All @@ -44,12 +48,7 @@ module API
Person = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pbbuildertest.Person").msgclass
Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pbbuildertest.Asset").msgclass
end

class << Rails
def cache
@cache ||= ActiveSupport::Cache::MemoryStore.new
end
end


class Racer < Struct.new(:id, :name, :friends, :best_friend, :logo)
extend ActiveModel::Naming
Expand Down

0 comments on commit 8a43593

Please sign in to comment.