Commit 29dc8da4 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

use percentage

parent 2096cfbc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -21,12 +21,11 @@
#include "utils.h"
using namespace std;

Statsgen::Statsgen(const std::string& name) {
Statsgen::Statsgen(const std::string& name):filename(name){
	if (name == "-"){
		is_stdin = true;
		cerr << "[WARNING]" << " reading from stdin enabled, loading the whole list in memory" << endl;
	}
	filename = name;
}


+2 −2
Original line number Diff line number Diff line
@@ -193,8 +193,8 @@ void MainWindow::disableWithCount()
void MainWindow::initGraphicalStats(QBarSeries * barLength, QPieSeries * pieCharset, double & percentageTotal, double & percentageSecurity) {
    double total = stats.getTotalCounter();
    double filter = stats.getTotalFilter();
    percentageTotal = (double) 100 * (filter / total);
    percentageSecurity = (double) 100 * (stats.getNbSecurePasswords() / total);
    percentageTotal = percentage(filter, total);
    percentageSecurity = percentage(stats.getNbSecurePasswords(), total);

    /* LENGTH HISTOGRAM */
    multimap<uint64_t, int> reverseL = flip_map<int>(stats.getStatsLength());