Top Level Namespace
Defined Under Namespace
Modules: Lutaml, PerformanceHelpers, XmlCompilerBenchmarks Classes: Address, BenchmarkRunner, CollectionHandlerBenchmark, PerformanceComparator, Person, SomeCollection, XmlCompilerBenchmarkRunner, XmlElementBenchmark
Constant Summary collapse
- ITERATIONS =
Number of iterations for profiling
10
Instance Method Summary collapse
- #person_instance ⇒ Object
-
#person_xml ⇒ Object
Test data.
Instance Method Details
#person_instance ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/tasks/memory_profile.rb', line 74 def person_instance Person.new( id: 123, first_name: "John", last_name: "Doe", email: "john@example.com", age: 30, address: Address.new( street: "123 Main St", city: "City", zip: "12345", country: "Country", ), phone_numbers: ["555-1000", "555-2000"], tags: ["tag1", "tag2"], ) end |
#person_xml ⇒ Object
Test data
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/tasks/memory_profile.rb', line 53 def person_xml <<~XML <person id="123"> <first_name>John</first_name> <last_name>Doe</last_name> <email>john@example.com</email> <age>30</age> <address> <street>123 Main St</street> <city>City</city> <zip>12345</zip> <country>Country</country> </address> <phone_number>555-1000</phone_number> <phone_number>555-2000</phone_number> <tag>tag1</tag> <tag>tag2</tag> </person> XML end |