Changeset 1593


Ignore:
Timestamp:
Jun 6, 2010, 12:23:47 PM (12 years ago)
Author:
Sven Rech
Message:

possibility to give out measures in quadratic sieve plugin to show with gnuplot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/QuadraticSieve/QuadraticSieve.cs

    r1588 r1593  
    6363        private PeerToPeer peerToPeer;
    6464        private bool usePeer2Peer;
     65        private bool useGnuplot = true;
     66        private StreamWriter gnuplotFile;
    6567
    6668        private static Assembly msieveDLL = null;
     
    168170                peerToPeer.SetNumber(InputNumber);
    169171            }
     172
     173            if (useGnuplot)
     174                gnuplotFile = new StreamWriter(Path.Combine(directoryName, "gnuplot.dat"), false);
    170175                       
    171176            userStopped = false;
     
    260265               
    261266            }
     267            if (useGnuplot)
     268                gnuplotFile.Close();
     269
    262270            alreadyInUse = false;
    263271        }
     
    548556                , null);
    549557            }
     558
     559            if (useGnuplot)
     560            {
     561                double percentage = (double)num_relations / max_relations;
     562                double time = (DateTime.Now - start_sieving_time).TotalSeconds;
     563                gnuplotFile.WriteLine("" + time + "\t\t" + percentage);
     564            }
    550565        }
    551566
Note: See TracChangeset for help on using the changeset viewer.