perf.pas 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. (*******************************************************************)
  2. (* *)
  3. (* The contents of this file are subject to the Interbase Public *)
  4. (* License Version 1.0 (the "License"); you may not use this file *)
  5. (* except in compliance with the License. You may obtain a copy *)
  6. (* of the License at http://www.Inprise.com/IPL.html *)
  7. (* *)
  8. (* Software distributed under the License is distributed on an *)
  9. (* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express *)
  10. (* or implied. See the License for the specific language governing *)
  11. (* rights and limitations under the License. *)
  12. (* *)
  13. (* The Original Code was created by Inprise Corporation *)
  14. (* and its predecessors. Portions created by Inprise Corporation are *)
  15. (* Copyright (C) Inprise Corporation. *)
  16. (* *)
  17. (* All Rights Reserved. *)
  18. (* Contributor(s): ______________________________________. *)
  19. (*******************************************************************)
  20. (*
  21. * PROGRAM: JRD Access Method
  22. * MODULE: perf.pas
  23. * DESCRIPTION: Peformance tool block
  24. *)
  25. type
  26. tms = record
  27. tms_utime : integer32;
  28. tms_stime : integer32;
  29. tms_cutime : integer32;
  30. tms_cstime : integer32;
  31. end;
  32. perf = record
  33. perf_fetches : integer32;
  34. perf_marks : integer32;
  35. perf_reads : integer32;
  36. perf_writes : integer32;
  37. perf_current_memory : integer32;
  38. perf_max_memory : integer32;
  39. perf_buffers : integer32;
  40. perf_page_size : integer32;
  41. perf_elapsed : integer32;
  42. perf_times : tms;
  43. end;
  44. (* Letter codes controlling printting of statistics:
  45. !f - fetches
  46. !m - marks
  47. !r - reads
  48. !w - writes
  49. !e - elapsed time (in seconds)
  50. !u - user times
  51. !s - system time
  52. !p - page size
  53. !b - number buffers
  54. !d - delta memory
  55. !c - current memory
  56. !x - max memory
  57. *)
  58. (* Entry point definitions *)
  59. procedure perf_get_info (
  60. in handle : gds__handle;
  61. out block : perf
  62. ); extern;
  63. procedure perf_format (
  64. in before : perf;
  65. in after : perf;
  66. in control : UNIV string;
  67. in{out} buffer : UNIV string;
  68. in buf_len : integer
  69. ); extern;
  70. procedure perf_report (
  71. in before : perf;
  72. in after : perf;
  73. in{out} buffer : UNIV string;
  74. in buf_len : integer
  75. ); extern;