perfmonger 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +15 -0
  2. data/.dir-locals.el +2 -0
  3. data/.gitignore +4 -0
  4. data/.rspec +1 -0
  5. data/.travis.yml +12 -0
  6. data/COPYING +674 -0
  7. data/Gemfile +5 -0
  8. data/HOWTO.md +15 -0
  9. data/NEWS +115 -0
  10. data/README.md +61 -0
  11. data/Rakefile +8 -0
  12. data/bin/perfmonger +6 -0
  13. data/data/NOTICE +8 -0
  14. data/data/Twitter_Bootstrap_LICENSE.txt +176 -0
  15. data/data/assets/css/bootstrap-responsive.css +1109 -0
  16. data/data/assets/css/bootstrap.css +6167 -0
  17. data/data/assets/css/perfmonger.css +17 -0
  18. data/data/assets/dashboard.erb +319 -0
  19. data/data/assets/img/glyphicons-halflings-white.png +0 -0
  20. data/data/assets/img/glyphicons-halflings.png +0 -0
  21. data/data/assets/js/bootstrap.js +2280 -0
  22. data/data/assets/js/bootstrap.min.js +6 -0
  23. data/data/assets/js/canvasjs.js +9042 -0
  24. data/data/assets/js/canvasjs.min.js +271 -0
  25. data/data/sysstat.ioconf +268 -0
  26. data/ext/perfmonger/extconf.rb +19 -0
  27. data/ext/perfmonger/perfmonger.h +58 -0
  28. data/ext/perfmonger/perfmonger_record.c +754 -0
  29. data/ext/perfmonger/sysstat/common.c +627 -0
  30. data/ext/perfmonger/sysstat/common.h +207 -0
  31. data/ext/perfmonger/sysstat/ioconf.c +515 -0
  32. data/ext/perfmonger/sysstat/ioconf.h +84 -0
  33. data/ext/perfmonger/sysstat/iostat.c +1100 -0
  34. data/ext/perfmonger/sysstat/iostat.h +121 -0
  35. data/ext/perfmonger/sysstat/libsysstat.h +19 -0
  36. data/ext/perfmonger/sysstat/mpstat.c +953 -0
  37. data/ext/perfmonger/sysstat/mpstat.h +79 -0
  38. data/ext/perfmonger/sysstat/rd_stats.c +2388 -0
  39. data/ext/perfmonger/sysstat/rd_stats.h +651 -0
  40. data/ext/perfmonger/sysstat/sysconfig.h +13 -0
  41. data/lib/perfmonger/cli.rb +115 -0
  42. data/lib/perfmonger/command/base_command.rb +39 -0
  43. data/lib/perfmonger/command/fingerprint.rb +453 -0
  44. data/lib/perfmonger/command/plot.rb +429 -0
  45. data/lib/perfmonger/command/record.rb +32 -0
  46. data/lib/perfmonger/command/record_option.rb +149 -0
  47. data/lib/perfmonger/command/server.rb +294 -0
  48. data/lib/perfmonger/command/stat.rb +60 -0
  49. data/lib/perfmonger/command/stat_option.rb +29 -0
  50. data/lib/perfmonger/command/summary.rb +402 -0
  51. data/lib/perfmonger/config.rb +6 -0
  52. data/lib/perfmonger/version.rb +5 -0
  53. data/lib/perfmonger.rb +12 -0
  54. data/misc/release-howto.txt +17 -0
  55. data/misc/sample-cpu.png +0 -0
  56. data/misc/sample-read-iops.png +0 -0
  57. data/perfmonger.gemspec +44 -0
  58. data/test/run-test.sh +39 -0
  59. data/test/spec/bin_spec.rb +37 -0
  60. data/test/spec/data/2devices.expected +42 -0
  61. data/test/spec/data/2devices.output +42 -0
  62. data/test/spec/spec_helper.rb +20 -0
  63. data/test/spec/summary_spec.rb +193 -0
  64. data/test/test-perfmonger.c +145 -0
  65. data/test/test.h +9 -0
  66. metadata +154 -0
@@ -0,0 +1,79 @@
1
+ /*
2
+ * mpstat: per-processor statistics
3
+ * (C) 2000-2010 by Sebastien Godard (sysstat <at> orange.fr)
4
+ */
5
+
6
+ #ifndef _MPSTAT_H
7
+ #define _MPSTAT_H
8
+
9
+ /*
10
+ ***************************************************************************
11
+ * mpstat's specific system files.
12
+ ***************************************************************************
13
+ */
14
+
15
+ #define SOFTIRQS "/proc/softirqs"
16
+
17
+ /*
18
+ ***************************************************************************
19
+ * Activities definitions.
20
+ ***************************************************************************
21
+ */
22
+
23
+ #define M_D_CPU 0x0001
24
+ #define M_D_IRQ_SUM 0x0002
25
+ #define M_D_IRQ_CPU 0x0004
26
+ #define M_D_SOFTIRQS 0x0008
27
+
28
+ #ifndef DISPLAY_CPU
29
+ #define DISPLAY_CPU(m) (((m) & M_D_CPU) == M_D_CPU)
30
+ #endif
31
+ #define DISPLAY_IRQ_SUM(m) (((m) & M_D_IRQ_SUM) == M_D_IRQ_SUM)
32
+ #define DISPLAY_IRQ_CPU(m) (((m) & M_D_IRQ_CPU) == M_D_IRQ_CPU)
33
+ #define DISPLAY_SOFTIRQS(m) (((m) & M_D_SOFTIRQS) == M_D_SOFTIRQS)
34
+
35
+ /*
36
+ ***************************************************************************
37
+ * Keywords and constants.
38
+ ***************************************************************************
39
+ */
40
+
41
+ /* Indicate that option -P has been used */
42
+ #define F_P_OPTION 0x01
43
+
44
+ #define USE_P_OPTION(m) (((m) & F_P_OPTION) == F_P_OPTION)
45
+
46
+ #define K_SUM "SUM"
47
+ #define K_CPU "CPU"
48
+ #define K_SCPU "SCPU"
49
+
50
+ #define NR_IRQCPU_PREALLOC 3
51
+
52
+ #define MAX_IRQ_LEN 16
53
+
54
+ /*
55
+ ***************************************************************************
56
+ * Structures used to store statistics.
57
+ ***************************************************************************
58
+ */
59
+
60
+ /*
61
+ * stats_irqcpu->irq: IRQ#-A
62
+ * stats_irqcpu->interrupt: number of IRQ#-A for proc 0
63
+ * stats_irqcpu->irq: IRQ#-B
64
+ * stats_irqcpu->interrupt: number of IRQ#-B for proc 0
65
+ * ...
66
+ * stats_irqcpu->irq: (undef'd)
67
+ * stats_irqcpu->interrupt: number of IRQ#-A for proc 1
68
+ * stats_irqcpu->irq: (undef'd)
69
+ * stats_irqcpu->interrupt: number of IRQ#-B for proc 1
70
+ * ...
71
+ */
72
+ struct stats_irqcpu {
73
+ unsigned int interrupt __attribute__ ((aligned (4)));
74
+ char irq_name[MAX_IRQ_LEN];
75
+ };
76
+
77
+ #define STATS_IRQCPU_SIZE (sizeof(struct stats_irqcpu))
78
+
79
+ #endif