{"action":"closed","issue":{"url":"https://api.github.com/repos/petabridge/NBench/issues/136","repository_url":"https://api.github.com/repos/petabridge/NBench","labels_url":"https://api.github.com/repos/petabridge/NBench/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/petabridge/NBench/issues/136/comments","events_url":"https://api.github.com/repos/petabridge/NBench/issues/136/events","html_url":"https://github.com/petabridge/NBench/issues/136","id":173052204,"number":136,"title":"GcMetric.TotalCollections doesn't do anything","user":{"login":"kasajian","id":2384797,"avatar_url":"https://avatars.githubusercontent.com/u/2384797?v=3","gravatar_id":"","url":"https://api.github.com/users/kasajian","html_url":"https://github.com/kasajian","followers_url":"https://api.github.com/users/kasajian/followers","following_url":"https://api.github.com/users/kasajian/following{/other_user}","gists_url":"https://api.github.com/users/kasajian/gists{/gist_id}","starred_url":"https://api.github.com/users/kasajian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasajian/subscriptions","organizations_url":"https://api.github.com/users/kasajian/orgs","repos_url":"https://api.github.com/users/kasajian/repos","events_url":"https://api.github.com/users/kasajian/events{/privacy}","received_events_url":"https://api.github.com/users/kasajian/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-24T20:37:39Z","updated_at":"2016-08-24T21:00:14Z","closed_at":"2016-08-24T21:00:14Z","body":"The following code:\r\n\r\n```\r\n    public class MyPerfSpecs\r\n    {\r\n        [PerfSetup]\r\n        public void Setup(BenchmarkContext context)\r\n        {\r\n        }\r\n\r\n        [PerfBenchmark(NumberOfIterations = 1, RunMode = RunMode.Iterations, TestMode = TestMode.Measurement)]\r\n        [GcMeasurement(GcMetric.TotalCollections, GcGeneration.AllGc)]\r\n        public void Benchmark()\r\n        {\r\n            var a = new int[10000];\r\n            a[0] = 1;\r\n            a[1] = 2;\r\n            Console.WriteLine(1);\r\n            var t = \"ab;cd;ef;gh\".Split(';');\r\n            Console.WriteLine(t);\r\n        }\r\n\r\n        [PerfCleanup]\r\n        public void Cleanup()\r\n        {\r\n        }\r\n    }\r\n```\r\n\r\nShould show a bunch of GC allocations.   I see none.  I see:\r\n\r\n````\r\n--------------- RESULTS: TryNBench.MyPerfSpecs+Benchmark ---------------\r\n--------------- DATA ---------------\r\nTotalCollections [Gen0]: Max: 0.00 collections, Average: 0.00 collections, Min: 0.00 collections, StdDev: 0.00 collections\r\nTotalCollections [Gen0]: Max / s: 0.00 collections, Average / s: 0.00 collections, Min / s: 0.00 collections, StdDev / s: 0.00 collections\r\n\r\nTotalCollections [Gen1]: Max: 0.00 collections, Average: 0.00 collections, Min: 0.00 collections, StdDev: 0.00 collections\r\nTotalCollections [Gen1]: Max / s: 0.00 collections, Average / s: 0.00 collections, Min / s: 0.00 collections, StdDev / s: 0.00 collections\r\n\r\nTotalCollections [Gen2]: Max: 0.00 collections, Average: 0.00 collections, Min: 0.00 collections, StdDev: 0.00 collections\r\nTotalCollections [Gen2]: Max / s: 0.00 collections, Average / s: 0.00 collections, Min / s: 0.00 collections, StdDev / s: 0.00 collections\r\n\r\n\r\n------------ FINISHED TryNBench.MyPerfSpecs+Benchmark ----------\r\n````\r\n\r\nCan anyone tell if I'm doing something wrong?  Or am I misunderstanding the purpose.\r\n\r\n\r\n"}}
{"actor":{"display_login":"kasajian"}}