From 5e527213a2430bb3018e5eebd909aef294edf9b5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- examples/cxx/parser/performance/gen.cxx | 76 --------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 examples/cxx/parser/performance/gen.cxx (limited to 'examples/cxx/parser/performance/gen.cxx') diff --git a/examples/cxx/parser/performance/gen.cxx b/examples/cxx/parser/performance/gen.cxx deleted file mode 100644 index b6392c0..0000000 --- a/examples/cxx/parser/performance/gen.cxx +++ /dev/null @@ -1,76 +0,0 @@ -#include -#include -#include - -using namespace std; - -static const char* enums[] = -{ - "romance", - "fiction", - "horror", - "history", - "philosophy" -}; - -int -main (int argc, char* argv[]) -{ - if (argc != 3) - { - cerr << "usage: " << argv[0] << " " << endl; - return 1; - } - - unsigned long n (0); - istringstream is (argv[1]); - is >> n; - - if (n == 0) - { - cerr << "record count argument should be a positive number" << endl; - return 1; - } - - ofstream ofs (argv[2]); - - if (!ofs.is_open ()) - { - cerr << "unable to open '" << argv[2] << "' in write mode" << endl; - return 1; - } - - ofs << ""; - - unsigned short ch (1), en (0); - - for (unsigned long i (0); i < n; ++i) - { - ofs << "" - << "42" - << "42345.4232" - << "name123_45"; - - if (i % 2 == 1) - ofs << "one two three"; - - ofs << "" << ch << " choice" - << "" << enums[en] << "" - << ""; - - if (++ch > 4) - ch = 1; - - if (++en > 4) - en = 0; - } - - ofs << ""; -} -- cgit v1.1