Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
3.7 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993.
  5. //
  6. // File: bm_nstg.hxx
  7. //
  8. // Contents: Nested storage test class definition
  9. //
  10. // Classes: CNestedStorageTest
  11. //
  12. // Functions:
  13. //
  14. // History: 09-June-94 t-vadims Created
  15. //
  16. //--------------------------------------------------------------------------
  17. #ifndef _BM_NSTG_HXX_
  18. #define _BM_NSTG_HXX_
  19. #include <bm_base.hxx>
  20. // Maximum allowed branching and nesting factors
  21. // Using both maximums at the same time is not recommended,
  22. // due to exponetial growth of time requirements
  23. #define MAX_BRANCHING 7
  24. #define MAX_NESTING 7
  25. class CNestedStorageTest : public CTestBase
  26. {
  27. public:
  28. virtual TCHAR *Name ();
  29. virtual SCODE Setup (CTestInput *input);
  30. virtual SCODE Run ();
  31. virtual SCODE Report (CTestOutput &OutputFile);
  32. virtual SCODE Cleanup ();
  33. private:
  34. ULONG m_ulIterations;
  35. // timing arrays
  36. ULONG m_ulStgCreateDocfile[TEST_MAX_ITERATIONS];
  37. ULONG m_ulFinalStorageCommit[TEST_MAX_ITERATIONS];
  38. ULONG m_ulFinalStorageRelease[TEST_MAX_ITERATIONS];
  39. ULONG m_ulCreateStorageMin[MAX_NESTING][TEST_MAX_ITERATIONS];
  40. ULONG m_ulCreateStorageMax[MAX_NESTING][TEST_MAX_ITERATIONS];
  41. ULONG m_ulCreateStorageAverage[TEST_MAX_ITERATIONS];
  42. ULONG m_ulCreateStorageTotal[TEST_MAX_ITERATIONS];
  43. ULONG m_ulStorageReleaseMin[MAX_NESTING][TEST_MAX_ITERATIONS];
  44. ULONG m_ulStorageReleaseMax[MAX_NESTING][TEST_MAX_ITERATIONS];
  45. ULONG m_ulStorageReleaseAverage[TEST_MAX_ITERATIONS];
  46. ULONG m_ulStorageReleaseTotal[TEST_MAX_ITERATIONS];
  47. ULONG m_ulCreateStreamMin[TEST_MAX_ITERATIONS];
  48. ULONG m_ulCreateStreamMax[TEST_MAX_ITERATIONS];
  49. ULONG m_ulCreateStreamAverage[TEST_MAX_ITERATIONS];
  50. ULONG m_ulCreateStreamTotal[TEST_MAX_ITERATIONS];
  51. ULONG m_ulStreamWriteMin[TEST_MAX_ITERATIONS];
  52. ULONG m_ulStreamWriteMax[TEST_MAX_ITERATIONS];
  53. ULONG m_ulStreamWriteAverage[TEST_MAX_ITERATIONS];
  54. ULONG m_ulStreamWriteTotal[TEST_MAX_ITERATIONS];
  55. ULONG m_ulStreamReleaseMin[TEST_MAX_ITERATIONS];
  56. ULONG m_ulStreamReleaseMax[TEST_MAX_ITERATIONS];
  57. ULONG m_ulStreamReleaseAverage[TEST_MAX_ITERATIONS];
  58. ULONG m_ulStreamReleaseTotal[TEST_MAX_ITERATIONS];
  59. ULONG m_ulDestroyElementMin[TEST_MAX_ITERATIONS];
  60. ULONG m_ulDestroyElementMax[TEST_MAX_ITERATIONS];
  61. ULONG m_ulDestroyElementAverage[TEST_MAX_ITERATIONS];
  62. ULONG m_ulDestroyElementTotal[TEST_MAX_ITERATIONS];
  63. ULONG m_ulStorageCommitMin[MAX_NESTING][TEST_MAX_ITERATIONS];
  64. ULONG m_ulStorageCommitMax[MAX_NESTING][TEST_MAX_ITERATIONS];
  65. ULONG m_ulStorageCommitAverage[TEST_MAX_ITERATIONS];
  66. ULONG m_ulStorageCommitTotal[TEST_MAX_ITERATIONS];
  67. ULONG m_ulTotal[TEST_MAX_ITERATIONS];
  68. BYTE *m_pbData; // data to be written
  69. OLECHAR m_pwszFile[MAX_PATH]; // file name to be written for OLE
  70. TCHAR m_pszFile[MAX_PATH]; // file name to be written for WIN32
  71. TCHAR m_pszFileMode[15]; // file access mode (TRANSACTED / DIRECTED)
  72. ULONG m_flCreateFlags; // Creation flag (STGM_TRANSACTED / STGM_DIRECT)
  73. BOOL m_bDelete; // flag if we are to delete streams
  74. ULONG m_cbSize; // number of bytes in data
  75. ULONG m_cBranching; // Branching factor
  76. ULONG m_cNesting; // nesting factor
  77. ULONG m_cParentFactor;
  78. ULONG m_cStorages; // number of storages
  79. ULONG m_cStreams; // number of streams
  80. LPSTORAGE *m_piStorages; // array of storages
  81. LPMALLOC m_piMalloc; // pointer of task allocator.
  82. };
  83. #endif