gctrack 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -0
- data/Gemfile.lock +2 -2
- data/LICENSE.md +1 -1
- data/README.md +1 -1
- data/ext/gctrack/gctrack.c +8 -7
- data/gctrack.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 65d1faae29e8e0e8a7ebafce07de5e62a09c71f4196fac35ef29afe8eeacb6d9
|
4
|
+
data.tar.gz: 73cf8d0b993f6a984eacb47686b1e9c58f1d3c59f0cc4a8b88ca07d33399be61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d1b983c3bbf19a35c27a21eb5f48e5109d7e189950c5ab86082ee933380d8d3358cd6078ad78c1c653064657731052eb48fc771deda0e7fae854dff312dcca7
|
7
|
+
data.tar.gz: 2b3fdea5f648907afec6add265244161e2559767166e61adfbf74edc96a9eb1177a21110d0f43c6df6756f6f4b9f535b74907a2836b0ada514c0e614cd679f7f
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2017 Shopify Inc.
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
data/ext/gctrack/gctrack.c
CHANGED
@@ -32,12 +32,8 @@ nanotime()
|
|
32
32
|
static inline void
|
33
33
|
add_gc_cycle(uint64_t duration)
|
34
34
|
{
|
35
|
-
|
36
|
-
|
37
|
-
record->cycles = record->cycles + 1;
|
38
|
-
record->duration = record->duration + duration;
|
39
|
-
record = record->parent;
|
40
|
-
}
|
35
|
+
last_record->cycles += 1;
|
36
|
+
last_record->duration += duration;
|
41
37
|
}
|
42
38
|
|
43
39
|
static inline bool
|
@@ -49,7 +45,7 @@ gctracker_enabled()
|
|
49
45
|
static void
|
50
46
|
gctracker_hook(VALUE tpval, void *data)
|
51
47
|
{
|
52
|
-
if (!
|
48
|
+
if (!last_record || !gctracker_enabled()) {
|
53
49
|
return;
|
54
50
|
}
|
55
51
|
rb_trace_arg_t *tparg = rb_tracearg_from_tracepoint(tpval);
|
@@ -149,6 +145,11 @@ gctracker_end_record(int argc, VALUE *argv, VALUE klass)
|
|
149
145
|
}
|
150
146
|
record_t *record = last_record;
|
151
147
|
last_record = record->parent;
|
148
|
+
|
149
|
+
if (last_record) {
|
150
|
+
last_record->cycles += record->cycles;
|
151
|
+
last_record->duration += record->duration;
|
152
|
+
}
|
152
153
|
|
153
154
|
VALUE stats = rb_ary_new2(2);
|
154
155
|
rb_ary_store(stats, 0, ULONG2NUM(record->cycles));
|
data/gctrack.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gctrack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Francis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
83
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
84
|
+
rubygems_version: 2.7.6
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: Track Ruby GC events
|