Comments (3)
直接通过 goc profile
获取到的coverprofile数据如下形式:
github.com/qiniu/goc/goc.go:21.13,23.2 1 1
这里的内容就是通过类似上面的变量CoverageVariableName
得到。其基本语义为
"文件:起始行.起始列,结束行.结束列 该基本块中的语句数量 该基本块被执行到的次数"
基于此,可计算覆盖行数和总行数。
目前goc仅提供最原始的coverprofile。
from goc.
这样算是可以算出来,但是项目比较大,这样生成的文件去解析的话很不方便,效率很低,以后会推出直接获取总行数,覆盖行数吗?
from goc.
这样是否方便呢? 一条命令就可以拿到总的statment数量
goc profile | awk '{result+=$2} END {print result}'
这样算是可以算出来,但是项目比较大,这样生成的文件去解析的话很不方便,效率很低,以后会推出直接获取总行数,覆盖行数吗?
这句是希望goc server
提供一个API吗?单纯的行数,感觉需求有点小,你这边有更多的分析场景需求嘛?
from goc.
Related Issues (20)
- 请问有展示报告的 HTML 网页等 GUI 吗?或者输出 JSON 文本也行 HOT 5
- Proposal: support Generics
- go cover不能生成可编译的打桩代码 HOT 4
- goc-v2编译时指定了LD_LIBRARY_PATH貌似不起作用 HOT 1
- goc v2版列出服务列表命令后希望能刷新.goc.kvstore文件
- 文件实际上是一个符号链接(symlink), 会build失败
- 我们这边一个项目部署之后会出现多个服务,这时候注册到goc-center的pod会缺失,请问有啥办法解决吗
- 请教下同一个版本内发布了多次代码,如何统计全量的覆盖率 HOT 5
- 请问: goc是否支持分支覆盖率统计
- 对于打包镜像和部署容器非同一个的情况
- 公司内部服务统一了出口ip,有什么解决办法吗
- goc build --center=<远程goc server>成功后,没有生成xx_profile_listen_addr文件。 HOT 2
- goc build --singleton 时 如何获取coverage file HOT 1
- FATA Fail to build: fail to generate new go.mod: ... invalid go version '1.22.0': must match format 1.23 HOT 1
- goc运行大概8天就会重启一次,重启时的日志如下
- dump 代码覆盖率报错 HOT 4
- 重命名的文件,会被merge一起 HOT 2
- goc clear清理覆盖率失败了
- goc build main.go报错 HOT 3
- @CarlJi 我们也是一样的问题,goc build -o不允许指定具体的main包进行编译吗,只能cd到main包所在的目录下,然后goc自己去搜索main包,然后编译吗,如果这个目录下有多个main包,就会出现楼主上面的那个报错 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goc.