perfmonger 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.dir-locals.el +2 -0
- data/.gitignore +4 -0
- data/.rspec +1 -0
- data/.travis.yml +12 -0
- data/COPYING +674 -0
- data/Gemfile +5 -0
- data/HOWTO.md +15 -0
- data/NEWS +115 -0
- data/README.md +61 -0
- data/Rakefile +8 -0
- data/bin/perfmonger +6 -0
- data/data/NOTICE +8 -0
- data/data/Twitter_Bootstrap_LICENSE.txt +176 -0
- data/data/assets/css/bootstrap-responsive.css +1109 -0
- data/data/assets/css/bootstrap.css +6167 -0
- data/data/assets/css/perfmonger.css +17 -0
- data/data/assets/dashboard.erb +319 -0
- data/data/assets/img/glyphicons-halflings-white.png +0 -0
- data/data/assets/img/glyphicons-halflings.png +0 -0
- data/data/assets/js/bootstrap.js +2280 -0
- data/data/assets/js/bootstrap.min.js +6 -0
- data/data/assets/js/canvasjs.js +9042 -0
- data/data/assets/js/canvasjs.min.js +271 -0
- data/data/sysstat.ioconf +268 -0
- data/ext/perfmonger/extconf.rb +19 -0
- data/ext/perfmonger/perfmonger.h +58 -0
- data/ext/perfmonger/perfmonger_record.c +754 -0
- data/ext/perfmonger/sysstat/common.c +627 -0
- data/ext/perfmonger/sysstat/common.h +207 -0
- data/ext/perfmonger/sysstat/ioconf.c +515 -0
- data/ext/perfmonger/sysstat/ioconf.h +84 -0
- data/ext/perfmonger/sysstat/iostat.c +1100 -0
- data/ext/perfmonger/sysstat/iostat.h +121 -0
- data/ext/perfmonger/sysstat/libsysstat.h +19 -0
- data/ext/perfmonger/sysstat/mpstat.c +953 -0
- data/ext/perfmonger/sysstat/mpstat.h +79 -0
- data/ext/perfmonger/sysstat/rd_stats.c +2388 -0
- data/ext/perfmonger/sysstat/rd_stats.h +651 -0
- data/ext/perfmonger/sysstat/sysconfig.h +13 -0
- data/lib/perfmonger/cli.rb +115 -0
- data/lib/perfmonger/command/base_command.rb +39 -0
- data/lib/perfmonger/command/fingerprint.rb +453 -0
- data/lib/perfmonger/command/plot.rb +429 -0
- data/lib/perfmonger/command/record.rb +32 -0
- data/lib/perfmonger/command/record_option.rb +149 -0
- data/lib/perfmonger/command/server.rb +294 -0
- data/lib/perfmonger/command/stat.rb +60 -0
- data/lib/perfmonger/command/stat_option.rb +29 -0
- data/lib/perfmonger/command/summary.rb +402 -0
- data/lib/perfmonger/config.rb +6 -0
- data/lib/perfmonger/version.rb +5 -0
- data/lib/perfmonger.rb +12 -0
- data/misc/release-howto.txt +17 -0
- data/misc/sample-cpu.png +0 -0
- data/misc/sample-read-iops.png +0 -0
- data/perfmonger.gemspec +44 -0
- data/test/run-test.sh +39 -0
- data/test/spec/bin_spec.rb +37 -0
- data/test/spec/data/2devices.expected +42 -0
- data/test/spec/data/2devices.output +42 -0
- data/test/spec/spec_helper.rb +20 -0
- data/test/spec/summary_spec.rb +193 -0
- data/test/test-perfmonger.c +145 -0
- data/test/test.h +9 -0
- 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
|