File indexing completed on 2026-04-09 07:49:20
0001 #include <chrono>
0002 #include <thread>
0003
0004 #include "SProfile_test.h"
0005 #include "SProfile.h"
0006
0007 template<>
0008 std::vector<SProfile<4>> SProfile<4>::RECORD = {} ;
0009
0010
0011 SProfile_test::SProfile_test()
0012 :
0013 d(std::atoi(getenv("DELAY"))),
0014 prof(new SProfile<4>)
0015 {
0016 std::chrono::microseconds delay(d);
0017
0018 for(int i=0 ; i < 10 ; i++)
0019 {
0020 for(int j=0 ; j < 100 ; j++)
0021 {
0022 *prof = {} ;
0023 prof->idx = i*100+j ;
0024
0025 for(int k=0 ; k < 4 ; k++)
0026 {
0027 prof->stamp(k) ;
0028 std::this_thread::sleep_for(delay);
0029 }
0030 prof->add();
0031 }
0032 std::string reldir = std::to_string(i) ;
0033 SProfile<4>::Save("$FOLD", reldir.c_str() );
0034 SProfile<4>::Clear();
0035 }
0036
0037 }
0038
0039
0040
0041 int main()
0042 {
0043 SProfile_test spt ;
0044 return 0 ;
0045 }
0046
0047