EventChart 2022.5.32 → 2022.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eventchart.js.rb +32 -0
- data/lib/extremeunzip.zzaqsu.rb +10 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d08291713dd6aebf62349c5ae9eb5d385eec785b81954cd3ca76ae814f2f2829
|
4
|
+
data.tar.gz: 825ab1105ab7d09833fe9a3a6c6fa844bb7e4b3c6141b61d69784a705c168b5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd8f00648c46212e29b4394bf899dca39c6bd7d4ff8a67ef55d699bae5d7845a22effa17a545d3264f95978621834971687c643c1925aa90152f8436a3d47392
|
7
|
+
data.tar.gz: 8c2f046a7f562d172ef56399853554f91d96f4c8e404c4519e2573fa03f7d360dac3507646d39cbe83ea17f5bf6c6be27fd3e522c189fe292e5bdb672624db17
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'victoriafresh'
|
4
|
+
require 'cbor'
|
5
|
+
require 'lzma'
|
6
|
+
require 'get_process_mem'
|
7
|
+
require 'em/timers'
|
8
|
+
|
9
|
+
class EventChart
|
10
|
+
# 解压
|
11
|
+
def reportEvent(eventType, event)
|
12
|
+
event['eventType']=eventType
|
13
|
+
|
14
|
+
@events << event
|
15
|
+
|
16
|
+
#EventMachine.add_timer(10) { writeEvents }
|
17
|
+
|
18
|
+
@timer&.cancel # Cancel existing timer.
|
19
|
+
|
20
|
+
@timer = EventMachine::Timer.new(10) { writeEvents }
|
21
|
+
end # def exuz(rootPath)
|
22
|
+
|
23
|
+
def writeEvents
|
24
|
+
compressed= @events.to_cbor
|
25
|
+
|
26
|
+
datastore= "events.cx" # 配置文件路径
|
27
|
+
|
28
|
+
extremeZipOutputFile = File.new(datastore, 'wb') # 创建文件
|
29
|
+
extremeZipOutputFile.syswrite(compressed) # 写入文件
|
30
|
+
extremeZipOutputFile.close # 关闭文件
|
31
|
+
end
|
32
|
+
end # class ExtremeUnZip
|
data/lib/extremeunzip.zzaqsu.rb
CHANGED
@@ -27,7 +27,8 @@ class ExtremeUnZip
|
|
27
27
|
|
28
28
|
x=1..wholeCbor.length
|
29
29
|
y=wholeCbor.map { |event| event["optimisticScore"] }
|
30
|
-
|
30
|
+
y1=wholeCbor.map { |event| event["speciesScore"] }
|
31
|
+
|
31
32
|
puts x
|
32
33
|
puts y
|
33
34
|
|
@@ -46,6 +47,14 @@ class ExtremeUnZip
|
|
46
47
|
|
47
48
|
puts yString
|
48
49
|
|
50
|
+
yString1=""
|
51
|
+
y1.each { |value| yString1=yString1+"#{value}," }
|
52
|
+
|
53
|
+
yString1="[#{yString1}]"
|
54
|
+
|
55
|
+
puts yString1
|
56
|
+
|
57
|
+
|
49
58
|
result =true # 解压成功
|
50
59
|
rescue EOFError => e # 文件内容提前到末尾。一般是压缩包文件未传输完全 。
|
51
60
|
puts "Error: the exz file may be incomplete." # 报告错误。文件可能不完整。
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: EventChart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2022.
|
4
|
+
version: 2022.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hxcan Cai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cod
|
@@ -122,6 +122,7 @@ extensions: []
|
|
122
122
|
extra_rdoc_files: []
|
123
123
|
files:
|
124
124
|
- bin/eventchart
|
125
|
+
- lib/eventchart.js.rb
|
125
126
|
- lib/extremeunzip.zzaqsu.rb
|
126
127
|
- lib/extremezip.zzaqsv.rb
|
127
128
|
homepage: http://rubygems.org/gems/EventChart
|