apache / openwhisk-cli

Apache OpenWhisk Command Line Interface (CLI)
https://openwhisk.apache.org/
Apache License 2.0
103 stars 99 forks source link

Benchmarking reflection API calls, via ReportAllocs() #506

Open advancedwebdeveloper opened 3 years ago

advancedwebdeveloper commented 3 years ago

Hi.

I have applied such a patch - and it allowed to build, test the project:

https://gist.github.com/advancedwebdeveloper/bda9cfc45c8e133464f5eea9a4f0e50e .

@ianlancetaylor proposed such a benchmarking option: https://groups.google.com/g/golang-nuts/c/S2gBW3BV4QU/m/uW9KN7AuFwAJ https://golang.org/pkg/testing/#B.ReportAllocs .

I see such lines, which invoked the reflection API: https://github.com/apache/openwhisk-cli/blob/fcac2ac4265ec3ec7f844da95e6197b45474b407/commands/util.go#L263 https://github.com/apache/openwhisk-cli/blob/e3f41f9c0a9617774f473b12d1c379557a928bb4/commands/action.go#L891 https://github.com/apache/openwhisk-cli/blob/d4307b767c69a36ee824ada959edb3454b239d1d/commands/api.go#L70 .

What is the minimal scenario, to perform a strictly bench-marking test?