execution_time 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -1
- data/lib/execution_time/version.rb +1 -1
- data/lib/execution_time.rb +5 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db79ec20431ed5134a18fb0b21029400df60851760d2bf4e5390d4f22a3d0b69
|
4
|
+
data.tar.gz: 1f6a6575fba8d55758c9a2a6b591d3084f418b390ef9ec1884e7e67399f7315f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4efa6a6e4482fc17fcdcf8637c2f835e8fddf5f10446f21288bd6da669e66fc20611e2dbe3f2d136d61f42caa833d148727fcb9824f032499a0c9c070d6a751d
|
7
|
+
data.tar.gz: be78c6409bf4ce01056a367a0921db07a44af8738f242a404949d1654a9e72aae10158b0c9e3db16fd866cb6a3fa81bad6d3ace7b9640bd91a120af46256ad7b
|
data/README.md
CHANGED
@@ -10,7 +10,20 @@ Monitor execution time and other metrics directly in `rails console`, similar to
|
|
10
10
|
|
11
11
|
Just add this gem to the Gemfile and start `rails c`. After this try to do something like `User.first`.
|
12
12
|
|
13
|
-
If you want to measure few lines of code just wrap it with `begin/end
|
13
|
+
If you want to measure few lines of code just wrap it with `begin/end`:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
[4] pry(main)> begin
|
17
|
+
[4] pry(main)* User.first.first_name.size
|
18
|
+
[4] pry(main)* a = User.count + 1
|
19
|
+
[4] pry(main)* b = User.second.last_name.size
|
20
|
+
[4] pry(main)* end
|
21
|
+
User Load (0.4ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT $1 [["LIMIT", 1]]
|
22
|
+
(3.6ms) SELECT COUNT(*) FROM "users"
|
23
|
+
User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT $1 OFFSET $2 [["LIMIT", 1], ["OFFSET", 1]]
|
24
|
+
[METRICS] Completed in 6.8ms | Allocations: 839 | ActiveRecord: 4.3ms (queries: 3)
|
25
|
+
=> 5
|
26
|
+
```
|
14
27
|
|
15
28
|
## Installation
|
16
29
|
|
data/lib/execution_time.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: execution_time
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Kasyanchuk
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -56,7 +56,7 @@ homepage: https://github.com/igorkasyanchuk
|
|
56
56
|
licenses:
|
57
57
|
- MIT
|
58
58
|
metadata: {}
|
59
|
-
post_install_message:
|
59
|
+
post_install_message:
|
60
60
|
rdoc_options: []
|
61
61
|
require_paths:
|
62
62
|
- lib
|
@@ -71,8 +71,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
|
-
rubygems_version: 3.
|
75
|
-
signing_key:
|
74
|
+
rubygems_version: 3.2.3
|
75
|
+
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Measure execution time in Rails console
|
78
78
|
test_files: []
|