mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
prevent divding by zero when number of zones is 1 in csvexport
This commit is contained in:
parent
c79154c87b
commit
1fc33b9389
@ -337,7 +337,9 @@ int main(int argc, char** argv)
|
|||||||
const auto ss = zone_data.sumSq
|
const auto ss = zone_data.sumSq
|
||||||
- 2. * zone_data.total * avg
|
- 2. * zone_data.total * avg
|
||||||
+ avg * avg * sz;
|
+ avg * avg * sz;
|
||||||
const auto std = sqrt(ss / (sz - 1));
|
double std = 0;
|
||||||
|
if( sz > 1 )
|
||||||
|
std = sqrt(ss / (sz - 1));
|
||||||
values[9] = std::to_string(std);
|
values[9] = std::to_string(std);
|
||||||
|
|
||||||
std::string row = join(values, args.separator);
|
std::string row = join(values, args.separator);
|
||||||
|
Loading…
Reference in New Issue
Block a user