storj/cmd/metainfo-migration/fastpb/pointer_test.go
Egon Elbre da68f0cda7 cmd/metainfo-migration: add fastpb for faster unmarshaling
Change-Id: I7f9856fd48477cf54ade62b74935c26c411998aa
2021-01-27 16:26:12 +02:00

58 lines
17 KiB
Go

// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
package fastpb_test
import (
"encoding/hex"
"testing"
proto "github.com/gogo/protobuf/proto"
"storj.io/common/pb"
"storj.io/storj/cmd/metainfo-migration/fastpb"
)
var testRemoteSegment, _ = hex.DecodeString("080122bc1c0a08101e1864203c2850122000000000000000000000000000000000000000000000000000000000000000001a2212204f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c64981855ad8681d001a22122086d1e91e00167939cb6694d2c422acd208a0072939487f6999eb9d18a44784001a2212205d87f3c67cf22746e995af5a25367951baa2ff6cd471c483f15fb90badb37c001a22122021b6d95526a41a9504680b4e7c8b763a1b1d49d4955c8486216325253fec73001a221220d7a9e28bf921119c160f0702448615bbda08313f6a8eb668d20bf505987592001a221220668a5bdf2c7fc4844592d2572bcd0668d2d6c52f5054e2d0836bf84c7174cb001a22122076364cc3dbd968b0f7172ed85794bb358b0c3b525da1786f9fff094279db19001a221220ebd7a19d0f7bbacbe0255aa5b7d44bec40f84c892b9bffd43629b0223beea5001a221220f74391f445d15afd4294040374f6924b98cbf8713f8d962d7c8d019192c242001a221220e2cafccae3a61fb586b14323a6bc8f9e7df1d929333ff993933bea6f5b3af6001a2212200374366c4719e43a1b067d89bc7f01f1f573981659a44ff17a4c7215a3b539001a2212201e5849c6077dbb5722f5717a289a266f97647981998ebea89c0b4b37397011001a22122082ed6f4125c8fa7311e4d7defa922daae7786667f7e936cd4f24abf7df866b001a22122056038367ad6145de1ee8f4a8b0993ebdf8883a0ad8be9c3978b04883e56a15001a2212208de563afa467d49dec6a40e9a1d007f033c2823061bdd0eaa59f8e4da64301001a221220220d0b29688b734b8ea0f3ca9936e8461f10d77c96ea80a7a665f606f6a63b001a2212203dfd2567c18979e4d60f26686d9bf2fb26c901ff354cde1607ee294b39f32b001a2212207822ba64f84ab43ca0c6e6b91c1fd3be8990434179d3af4491a369012db92d001a2212204fc39d1734ff5716428953bb6865fcf92b0c3a17c9028be9914eb7649c6c93001a221220800979d1830356f2a54c3deab2a4b4475d63afbe8fb56987c77f5818526f18001a221220be823350eab13935f31d84484517e924aef78ae151c00755925836b7075885001a2212200c30ec29a3703934bf50a28da102975deda77e758579ea3dfe4136abf752b3001a221220271d03e944b3c9db366b75045f8efd69d22ae5411947cb553d7694267aef4e001a221220ea406b32d6108bd68584f57e37caac6e33feaa3263a399437024ba9c9b1467001a221220274f01a910ae295f6efbfe5f5abf44ccde263b5606633e2bf0006f28295d7d001a221220069f01a239c4365854c3af7f6b41d631f92b9a8d12f41257325fff332f7576001a221220620556304a3e3eae14c28d0cea39d2901a52720da85ca1e4b38eaf3f44c6c6001a2212208362f2f54fc00e09d6fc25640854c15dfcacaa8a2cecce5a3aba53ab705b18001a22122094b4d338a5143e63408d8724b0cf3fae17a3f79be1072fb63c35d6042c4160001a2212208ee9e2a9f3fb4ffb0019b454d522b5ffa17604193fb8966710a7960732ca52001a22122053c3f520c889b79bf504cfb57c7601232d589baccea9d6e263e25c27741d3f001a22122062cbbb15d9afbcbf7f7da41ab0408e3969c2e2cdcf233438bf1774ace7709a001a221220091e9a83fdeae0ec55eb233a9b5394cb3c7856b546d313c8a3b4c1c0e05447001a221220ba370eb36dbcfdec90b302dcdc3b9ef522e2a6f1ed0afec1f8e20faabedf6b001a2212202e717d3a748a58677a0c56348f8921a266b11d0f334c62fe52ba53af19779c001a221220948b6570ffa0b773963c130ad797ddeafe4e3ad29b5125210f0ef1c314090f001a221220c79a6f571c246f3e9ac0b7413ef110bd58b00ce73bff706f7ff4b6f44090a3001a22122011f3208e4e4b89cb5165ce64002cbd9c2887aa113df2468928d5a23b9ca740001a2212200c9382d9c6034ad2960c796503e1ce221725f50caf1fbfe831b10b7bf5b15c001a221220a53dbf8e7dcafc9e138647a4b44ed4bce964ed47f74aa594468ced323cb76f001a2212203fac476c9fb03fc9228fbae88fd580663a0454b68312207f0a3b584c623164001a221220b49753b5d5027ce15a4f0a58250d8fb50e77f2bf4f0152e5d49435807f9d4b001a221220be6fb77970466a5626fe33408cf9e88e2c797408a32d29416baf206a329cff001a2212204a75e498320982c85aad70384859c05a4b13a1d5b2f5bfef5a6ed92da482ca001a221220568e5b6fe9d8a9ddd9eb09277b92cef9046efa18500944cbe800a0b1527ea6001a22122029a861d2f6497a3235c37f4192779ec1d96b3b1c5424fce0b727b03072e641001a221220761f03abaa40abc9448fddeb2191d945c04767af847afd0edb5d8857b799ac001a2212208e4affabe3037ffe7fa68aa8af5e39cc416e734d373c5ebebc9cdcc595bcce001a2212207bd3d8df93fab7e125ddebafe65a31bd5d41e2d2ce9c2b17892f0fea1931a2001a221220220777a93143dfdcbfa68406e877073ff08834e197a4034aa48afa3f85b8a6001a22122008caebbac880b5b89b93da53810164402104e648b6226a1b78021851f5d9ac001a221220313a89ddfc454c5f8f72ac89b38b19f53784c19e9beac03c875a27db029de3001a221220e37a42318813487685929359ca8c5eb94e152dc1af42ea3d1676c1bdd19ab8001a221220925c6daee4de5ef9f9dcf08dfcbd02b80809398585928a0f7de50be1a6dc1d001a22122068e8537988fddce562e9b948c918bba3e933e5c400cde5e60c5ead6fc7ae77001a2212201d259b188a4b21c86fbc23d728b45347eada650af24c56d0800a8691332088001a22122005bd55c446e25eb07590bafcccbec6177536401d9a2b7f512b54bfc9d00532001a221220f5aaa7c3a96bc59b489f77d9042c5bce26b163defde5ee6a0fbb3e9346cef8001a2212200ae9515ef30fa47a364e75aea9e111d596e685a591121966e031650d510354001a221220845580ff560760fd36514ca197c875f1d02d9216eba7627e2398322eb5cf43001a2212202bd2e5b887d4630fb8d4747ead6eb82acd1c5b078143ee26a586ad23139d50001a221220723470bf24a865837c9123461c41f5ff99aa99ce24eb4d788576e3336e6549001a22122022558fdf297b9fa007864bafd7cd4ca1b2fb5766ab431a032b72b9a7e937ed001a2212208d0801f29055d3090d2463718254f9442483c7b98b938045da519843854b0e001a221220f7ba951a493f321f0966603022c1dfc579b99ed9d20d573ad53171c8fef7f1001a221220e4613bb365b2ebb44f0ffb6907136385cdc838f0bdd4c812f042577410aca0001a221220c2afbc4c79c62572e20f8ed94ee62b4de7aa1cc84c887e1f7c31e927dfe52a001a2212208f46627eb5d3a4fe16fafce23623e196c9dfff7fbaff4ffe94f4589733e563001a2212209d3045aad3e226488ac02cca4291aed169dce5039d6ab00e40f67aab29332d001a221220448b35507c7c8a09c4db07105dc31003620405da3b2169f5a910c9d0096e5e001a221220f1b570680746acd0cc7760331b663138d6d342b051b5df410637cf7aee9b0c001a22122010a8f9980630f34ce001c0ab7ac65e502d39b216cbc50e73a32eaf936401e2001a2212206bd8b82c30d346bc4b2fa319f245a8657ec122eaf4ad5425c249ee160e17b9001a22122041c2aee5df820ac85de3f8e784870fd87a36cc0d163833df636613a9cc9474001a221220b6592835b9f6f4f8c0e70dbeebae7b14cdb9bc41033aa5baf40d45e24d72ea001a221220a28e3ca030c9937ab8409a7cbf05ae21f97425254543d94d115900b90ae703001a2212207d9856d2441d14ba49a677de8b18cb454b99ddd9daa7ccbb7500dae4e2e5df001a221220f3859ebddada6745fba6a04c5c37c7ca35036f11732ce8bc27b48868611fc7001a22122082a491bfabd7a19df50fdc78a55dbbc2fd37f9296566557fab885b039f30e7001a221220f0cd5961e19b642221db44a69497b8ad99408fe1e037c68bf7c5e5de1d2c68001a2212202348ec1189fb2e36973cef09ff14be23922801f6eaee41409158b45f2dec82001a2212207caaba160cd640ff73495fe4a05ce1202ca7287ed3235b95e69f571fa5e656001a221220a51fae1ebdd7aa6269c2ec7f4057b33593bc84888c970fd528d4a99a1eab9d001a22122020134537cd6d02282e0981e140232a4a87383a21d1845c408ad75704381303001a2212200bd5a30dcca6e3aa2df04715d879279a96879a4f3690ac2025a60c7db15e05001a221220ebc34b734355fe4a059bd3899d920e95f1c46d432f9b08e64d7f9b38965d5a001a221220a7ac183c3833e1a3425ead69d4f975012fd1a49ed832f69e6e9c63b453ec04001a2212209e7a5cf944232d10353f64434abae060f6506ad3fdb1f4415b0af9ce8c208b001a2212200ee526741539fa3203c77ecba410fd6718f227e0b430f9bcb049a3d38540dc001a2212202969120ce80f2007cd42a708a721aa29987b45d4e428811984ecad349cc35d001a2212203515cefe0b002cee5e71c47935e281ebfc4b8b652b69ccb092e55a20f1b9f9001a221220046296124621928739a86671cc180152b953e3bf9d19f825c3dd54ae1688e4001a221220fb5efe65dcdad34bc860010e7c8c997cd5f9e320ca7d39d4ba801a175b1c76001a22122057832f3f36d7d893e216e4c7bbdb548d0ba48449330027368b34f9c69776b4001a2212201532da1c5be68ef4eebe8cb8fa7dc5483fb70c2c896334cb1f9cb5dfe044fa001a2212206197ff5dfd02f2ba3884c53dd718c8560da743a8e9d4aeae20ccef002d82ca001a2212202592b8d8f2a8df3b0c35f15b9b370dca80d4ca8e9a133eb52094f2dd5c0873001a22122052315d828846e37df68fd10658b480f2ac84233633957e688e924ffe3713b5001a22122076fd8a56da8bb07daa8eb4eb8f7334f99256e2766a4109150eed424f0f7435001a221220cdea66e5baaa03edc918e8305bb19fc0c6b4ddb4aa3886cb5090940fc6d4ca00288080c002320c08ccc1c5800610e8c7c7db023a0c08ccf9af8f0610e8c7c7db0242800266c691e4d52de51ccd3c064e174eb4b95d1df0585b8834ddf59e360f4b09d99616ae60c0d0708a1649b9872c30bc404e8723a0f1af775a92cb5bafcc6c301fac702c8e8f196b8f6d0c1e58aa2e46b8cce73075c9962c1152fe0f8f67da8199ffc35e63d2c58d641610e63ee297b3d6cae7ebedc0ae2c0ce5bfc9550891af441d123add3bd9c4ae982a7e93afb309c743384e9fc5492d598685893f5cfcce9acf2e389160182a614f787211b97f9e1715e685d22c950959c0fbd1d4732437342d1e3106c899f72ba41f106fe79bcd25992c705c5bb98c9cddfe98f7a434e83fe795a6a550e4f9e6405f7319304bcadca9dd9feb8dcef5409e47c65d8a3a08ed244a0c08ccc1c5800610e8c7c7db02500a")
var testInlineSegment, _ = hex.DecodeString("1a8020518f1b1f62d06f36b31bdfc56d8351a980a8a9568e8b0a1e21263f77c62aa3fc8746080a2b831a52d538c32b35927fc844304a46513d152d10feeb0bab49c63002451524ba37db776241e03404fa1a9fec370ad50822ebc6d4c12eb42356a9302b8e2b482e4388c1cdcf510c345d219e52bd8eacec0998557e595717f554cbd087c715e8ba9d50cfa4343fcd0d69f390cc58473d8a39dbd17f4ee5276575fd521de9db8ca595374595ac32b98b8c4da7899a554384934ef69f1fbb53773a02335deafe30222ecb47c2ee45659c207a72fb1e817b647a49a86f84f3a6c21d33e7c58f4529fd3243538ecac78866191bf357b770adfe802374d0bd0c42792a96cfc30c34183ba20a3e2ae949839fc29261f611a922d8dded9f2cc3817218e476264d8b7ff980277e62a1c8c1681afb7588a799ae6d52133835a34b74dfcae6b5a1e977abb6b2678912134c17cada44d1aca9500ca428097e17e383c098c4065186b6b1561310c9517192667cb01ad973c86183d3dd07257b771c1044b1d59168e146a8c1164bd3ccad80260dfbceb74533425b2b0de961a5a39271ede2386e0e6c44d97b1adc6d9f46b052072041ba0672706f1d3fa7e1402b68e1c10f5bae10295564d20fe5b46096cdfa0483de9f1f5574c4c91451888dbe1f5c6f0bdac2275ffe01e34ac7a5cea2d03d1b20c069def374d2cd967c8f22621d7e233619c0568c1ed5d3c3fbcad1d5a11df5691b9bd56156d4d039725de88e31dc10a4e80a6a47185f6d9ba66731fdff9f358beb904792dbc41fe16dde4be3cb459b1bcd5b5afbd2f23a0e906ead745c9f752dc60029b826a739e8c05ed4152f33b3c736374f8d8b660fdde82a9358301f0de2fa74e5e1a62f24bd7ec324b6eb0d4aac8b5fddc2f02346786ecb3e76b0c39a5c2f1c7b0ef33cdfba6cdd1e1a32c7cebe63376e0983174f3fb620d8b1304fda5b0292fd13aa05b3026a4f0e5ee15909ffdce7c26d85bc07d0d8a4a770f135d26faa0aeef818fbd1192dd49397cc3b5ae74bc615f4faa76233c6a71c91eed1944f8025316d231521b660e21fb78c56e85d2e54071140c2c2d237d0ce7f247ee67ab0e3500ac60ad02a6511ddf458bcbe19bcbb4718534fd2d9e57eaf2992812bd6b0db16bdee7f8cfd0d4fb8e6a014e3ab0075e5920dc94b347eed7e058f552a3039adb0cdc8d0b1cbc70d233c0717bd10c83ecf9dfbf9c7d8a0769641a9b64b9d01e2e951ac1e50bcf192d11d627a84cf2c1d43b58c8ff23aecd9639c9d4a9bedaac8880b6be1656def487adc8d5d806e8c1d7c8a55a5a72225a5004fcb5ba6a9bfe9dc63677921d73ebd16d3ad0fe51b55291d9347daf7e3ebbdb05bfd721013bb341791d89d3fb4ca5227ad2609a34c095275d248cc039e44613b6b7c2c7bd5506596e827314df994f2cbac5c15512cd345dbdcdbb1d804a6a7819f96b93886257a9c7a09304ca507149c19835216fdeff5e1c3abda3e28dca43f69c5aeec5750d18d76ea381ef0f9d783f8c0ee3d53514f85913cd504b4b06ee34e072aac43cd83efc56941acdc98fd478f141c65381025f143745e5981b856e97441ee706b2ce4b5b39ffee7ba5a152786d8265077b20f8f9b7175f7f3a141de3275c279c152354f9a4570e378f05b92b41b2a9c477db49062aefddf118279368a09b7accc6e660658c9edd04e9e0b87af4442593e5e6c5afeeafa53c7a60ad4fa64d4ac8161198c96429b02cdbfeef0375200d91e1cd8e9dfae7b685b2915566258c21bbafc658d7dc5df7484c514608167fe2478dc80b8849080d574e3abfc68c7f6d034e0f5a7e31a23cd16362c08d1bbedd2a7e90cedc8b6a2a808988ddef3448e8fb2dd9364be15ca44f21ed5fea3646462238d5dc19f30402411c477c16da3bd626844189ed6a393efe5466c16e1a0fb2f028ab6bed7399827bb76769c0c89cdc0a1aa80da1eb4e76a2a565299a9d289141a0f3b871ad0f587dd97f523ec1b3825c2867c46d00b4cf7a3053a8f518a2b25bd23d1906998f798b09f1f813ad357cf956d7e8023405fd53545b54f27330e1d91b2e8398ebd42ab12a471e51c7dcbf3051aa1c19cb13a9ea02a5e2ee9bb8735823a55ad481b5e7d77228fb15ffafcf2c908aaa87599a68f1bb27a9bda4884a99730f0406ebd56d13d80ea561d4447b441809ac5b84b5aded9770d6cc0dcf81e068337d1e8bda7fdaa3fe24ad927ef3fd16adf586928c6986ef2892a6dba7b1e066c23e1737dbc26faeb469eaabb6ccac290f364a9877ac0d166494a0cb56b28307d6596536a58d38ba0379e9e4c20c9ac5389f9732f427a346f821ebf4e8444f2d3dd25a59b108ad45341b5fd7b759b03ab399c9c2d63790e711ace2f874c4843c40d63dc8b722f3280f3db6fa2b16050ef1d1164a46f031940cb2f8d626a5aecf5c4d60ef04ae3e84da5b988f87e240ce75aea5d72ce46488ea91ef209353fe5b661cc93ce95c002435cb76b96efe98694a524417fa853f35e7311a67e303e4d4643c7c8bf9298f178fe574bd342cd2d9bc5c11b70950db4a699a0b16ae826a084bc9579f768098977f4e897029ccdc617768fcec887de42cf555b32de5861fa26ffe0d6175d3f80841eb4f897b81557ba1b325ed6c4abb4ede51be89d9ceec0f4b1f74c8e9bdbaf3056560f43372350c67e2cf5a8965cf3604e214486cbdd47909d37b721667cf26da399b4cbadfa0f0521ebeb72e11d06116d51e6a2793924a9cf4024b921c8818d918b7a376992c8ac0ca37f21cff97ccebcca500743fa3fcfb62afffe466afaae5bb73d661bd1ab79f2d5ffe772b28f776f6406ad6342bc05f6764d58dfb4abe43ca75f6c54e0bf96de6c2f2393aa19e5d46a3f3f952a4fa753da5d9418a5734c12d800c53a35ec927d031a66bb84473115424cd58febdd1c07b6f31a0903f552127788df9be7eee2adaccbe2844b96e1d03144edc7fa5e8fe35159c6a4beb45bc830368c5f23979fc6c2e54a57e754c1468792420079efd9f5d3a1d7b612031f9a45443c706f0d9f02446bc0d67bad5c6ead170c60a5597e4543f2887e978f4ff4edf5729c85313d9cab23dca4d5fc7783c44f1784481bb9923bb30218126d084753c23e67f168bda1a3ed304e8091d24e96e059c8db2c86a3191a02df39bde474b43e963ab465e4a27ce43e254d1450a283dd3cf5657c5c1d9efa0356dd2ec2edac8b29a561a1b016355be0411b1006756dcac7f01a7c1a270e6ee3dfdaa0038224df5a98e9bf6b366e60da8ba3bd6cf767c6da528f5596661f13c1f4ec2f492a728627e85b9227ffbde81a25a2daf1f4987ed735c26972173646236b9be64a378c9ee391a089aba5abb88bf86a30096c6fa2e97b53faa91f8e6c372c95c78908e8665c3b2cacfe07156e062d8d2c6dc36abac501ae2d60e572f6677d9645248e34507df5a256f970940742939f0c248ee5127eebe61a2d5c89f6805ed4f29d704585b2f76a169d73eb8f75b9d2b0099ce0941049df3e20a14347eaff38d8a6e4d37b45b3fa9c94312d7fb96da5bb1a8e65ee483645c54412dec21dcdeff6141e6333cab7c77a1b79845b2713557ffdd44760496b2271fd16ca08c13c0f25a54ef356abb8ea5734f23ca15deb70ba32b3b601fb42dab4d2704ac71e011d43d8eb30c1610df799882b0a453f0d550ce258b6e016f4bd1aadbe395eb42e0e0fa140d87bf3ba8485001da6a80bbda9f54156428c09c9989a3acd52db1ebfe1b0efc469d6c137e6bd5b56eae1e7d3ed0191fa8a509c17e0896b8c98077bcb72dad96e0761bb714277060498df91c71e2c67bb30aa0b45d1ab4fb933d7713108d7335ee90196c34d8745f8dba1285045c7b512344ef05bf42bc8554c0b41cbe54f2bd25cd4847ec46ddbd1c5cae737e503685df85dcac80618f3c6789bfb0992279ae5bdd5e88b6a86aa21c10cc10e591e2124eda0f893d9e0c811f20aaa931942b8ac8cc47768b8b7bc767a6951929cb971ee92411a843bc0b5164c45b54da04409a52de86e79d13d8e735216191e757912d43940c16f7acf88eb169a0c72f26a3e1350e3cd872b17ba873b373e1c7d712d04aff6b192904c1880f95553b746e71b3f889b1748bc228a9812cbbade2a36ba76cc7167d79bfa0f075d256c568cccbcd759a2aa45ebbf3dcd9539fc47953d82dcf1ae3aecc09d96c4fcd567344d04b6ee25c569c421b0ad79917e8b0730fb5ffe45dc5ffa867ab332ae208bc30dbf1b5b63db5f688fd71e67d4357d979b6352b348a851516c795cf29d5a762b5bc498ef82cf1c3ef5bf1a535a80772d65d7c6b98c9bf95e794f99f1020579dbef3d6a8ddd47cf3012e09ddce22d175c6cb4d4ce85e285702938ee9389be4513f4cb6beb6ab3cebf3c87d71993f46c543bf41715404bea94b0a4570be06be8d5b655c006181cd0251a0f03a613445a5f611cfa90e4b4fea1e1cc4d24a338efbc6b3fb23ad17e686fed6f400e560ff9665d05d0ad0f772bed2f878e5b283a103a6f832f8a1639ac6bb50e338e7bb8867ab1c1016050402aab4a4ad1bbb61a1a2a54fdca83136c9e1ed31dc9e3b9e78ffa23ab769145299af9a80169aa8c351f1fe388df7921ef7e69949f96806c42a937e88dbc102603767a0539524ff806f6e12be69decf9ebace768c1eb0abbcef0e3b12dcd0121a36501887839139cb12f7fa33f6c37e16b4b0e5b34c01068597d8459759fa857548243c228c91a11f424f982831e2494fe3b81b93a345c364e30dfa76d38b273e2ada2a120554bf4e15207e28a921cd2742333242b19f2830fba90684ecc1108980bd558e05a5f2be4025bcab88e71a933a4c112ddb3fa70090fda9474f5f10debaf0f643c43eb8fc72cb247d912dc0ba91f2785128e29dc4ae26ca6539f3a4d7866cdfab5a5fda85e30205990096bc6c212db8e048ff12ef1a316a05650fb8be3c4846a2774aed4a798063d7e32a3ab419df9c8603b087631d196d581e71843d6d37af3ca7ddd28b0e75d4e2bb1baa401c88015fce9bd6cc33b703a1b50f0f33dcf2cdc6d8bd5c7ea168de9482b806ba00213be68418b475ddf4bcff757c5fef748bd30646b0dcb7c124a6fc89f7128c8cb9eb691d7fd5f3d1cb777cbefcba8398a9f6c5492eb49133108f35c14f14b2c66e8557d2c7128fdda18c0bc321715abed2bdd9039bac87395592579251ee5d221f204f4b5206b2bede765b7716745696194e4fbacac0e1381e8753548a7d49e8ec6fca062dcf57f2a55e03bde79eeda02b143c290eef695f255da99d1f1e416353cd100b08475996cc9220c8633a4bc6b23669f03095db245b03fd0e087c06faeddbc330f34dfd2ed2f68901dac2fbedf3669cb1432c37b89d189a8b527d6527a7ac6e58a40ecb753af267476d4e6c6eae91028c800a28f2a50c5bba5d448809bc70a1f5b7d8d5b8cd333e752e46e289f28f634c19c4f8dc70d6b1a6d1318ea57c2155055a8f7ec3433f44d26301608f6a1519e84af7f7f84a55285b5736d25b948281c41581bc312bb4d146833908765ea89fe74a09dc5d4629a659b66402f682e1382f116c94d870f29b76e114c4dd139f914ceec7a3d1a826892a9161e0294fda808dfd7097cfb9c332868e73cdadd7600269537efdc38355504fac87eff99e9d587de004ea0dcbae095d8fcf634e363b0819be47e45d776fc27b72bb89b8874e25200b29b88c1d41a2a5101fe513b2e1b301b71e93fad9ef362d7cc22e78716edea0efc38c48ae8caa78ca66d3c45c5e44c8250cc93288080c002320c08ccc1c5800610a483e8db023a0c08ccf9af8f0610a483e8db02428002d67ae2df803d3655c62d4238c2e8ae4f9f824eb0aa7ced0ed37278441fbb30a0d5c76ae63d249f480dae98bce27e7dd15f25b2780b7a07f06d05dd209b4aefa464af5e8fe48fd5dce031fd8e0acc6816aa0642be6d6f4c7a0e736ab311c1e1848f51abeafecdba3ed72607b6d35a4e0281b42bdd23197a9e1a8a94159492476a835f8dcf9d3690ca1d31ef5d949ed8cd876afc130a597db951a67c4a5237447a20aa5e298615280ea66602e2cf01f4acac4e136ad93b33bdb11cceb1c7f69a1f7f15d003e6634af4682246b18a1a12a015196c97a066de1dff195ce89a15b0b66555e1a36655415ccd3067a3bd8cccb49a36ee136745f91904570493845c556a4a0b088092b8c398feffffff01")
func BenchmarkCommon_RemoteSegment(b *testing.B) {
for i := 0; i < b.N; i++ {
p := pb.Pointer{}
err := proto.Unmarshal(testRemoteSegment, &p)
if err != nil {
b.Fatal(err)
}
}
}
func BenchmarkCommon_InlineSegment(b *testing.B) {
for i := 0; i < b.N; i++ {
p := pb.Pointer{}
err := proto.Unmarshal(testInlineSegment, &p)
if err != nil {
b.Fatal(err)
}
}
}
func BenchmarkFast_RemoteSegment(b *testing.B) {
for i := 0; i < b.N; i++ {
p := fastpb.Pointer{}
err := proto.Unmarshal(testRemoteSegment, &p)
if err != nil {
b.Fatal(err)
}
}
}
func BenchmarkFast_InlineSegment(b *testing.B) {
for i := 0; i < b.N; i++ {
p := fastpb.Pointer{}
err := proto.Unmarshal(testInlineSegment, &p)
if err != nil {
b.Fatal(err)
}
}
}