qa_server 2.2.3 → 3.0.0

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/app/assets/stylesheets/qa_server/_authorities.scss +4 -1
  4. data/app/assets/stylesheets/qa_server/_check-status.scss +5 -0
  5. data/app/assets/stylesheets/qa_server/_monitor-status.scss +2 -2
  6. data/app/models/concerns/qa_server/performance_history_data_keys.rb +16 -3
  7. data/app/models/qa_server/performance_history.rb +54 -46
  8. data/app/prepends/prepended_linked_data/find_term.rb +51 -9
  9. data/app/prepends/prepended_linked_data/search_query.rb +37 -9
  10. data/app/prepends/prepended_rdf/rdf_graph.rb +55 -0
  11. data/app/presenters/concerns/qa_server/monitor_status/performance_datatable_behavior.rb +55 -21
  12. data/app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb +54 -25
  13. data/app/presenters/qa_server/monitor_status_presenter.rb +11 -8
  14. data/app/services/qa_server/performance_calculator_service.rb +50 -47
  15. data/app/services/qa_server/performance_graph_data_service.rb +13 -12
  16. data/app/services/qa_server/performance_graphing_service.rb +49 -40
  17. data/app/views/qa_server/monitor_status/_performance.html.erb +107 -32
  18. data/config/locales/qa_server.en.yml +9 -2
  19. data/lib/generators/qa_server/config_generator.rb +1 -0
  20. data/lib/generators/qa_server/templates/config/authorities/linked_data/agrovoc_ld4l_cache.json +8 -1
  21. data/lib/generators/qa_server/templates/config/authorities/linked_data/dbpedia_ld4l_cache.json +8 -1
  22. data/lib/generators/qa_server/templates/config/authorities/linked_data/geonames_ld4l_cache.json +11 -1
  23. data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_aat_ld4l_cache.json +8 -1
  24. data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_tgn_ld4l_cache.json +8 -1
  25. data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_ulan_ld4l_cache.json +8 -1
  26. data/lib/generators/qa_server/templates/config/authorities/linked_data/locdemographics_ld4l_cache.json +2 -1
  27. data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_ld4l_cache.json +51 -42
  28. data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_rwo_ld4l_cache.json +237 -0
  29. data/lib/generators/qa_server/templates/config/authorities/linked_data/locperformance_ld4l_cache.json +75 -3
  30. data/lib/generators/qa_server/templates/config/authorities/linked_data/mesh_nlm_ld4l_cache.json +8 -1
  31. data/lib/generators/qa_server/templates/config/authorities/linked_data/nalt_ld4l_cache.json +8 -1
  32. data/lib/generators/qa_server/templates/config/authorities/linked_data/oclcfast_ld4l_cache.json +8 -1
  33. data/lib/generators/qa_server/templates/config/authorities/linked_data/rda_registry_ld4l_cache.json +193 -0
  34. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locnames_ld4l_cache_validation.yml +3 -18
  35. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locnames_rwo_ld4l_cache_validation.yml +27 -0
  36. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locperformance_ld4l_cache_validation.yml +1 -0
  37. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/rda_registry_ld4l_cache_validation.yml +255 -0
  38. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/wikidata_direct_validation.yml +6 -0
  39. data/lib/generators/qa_server/templates/config/authorities/linked_data/wikidata_direct.json +32 -0
  40. data/lib/generators/qa_server/templates/config/initializers/qa_server.rb +14 -5
  41. data/lib/generators/qa_server/templates/db/migrate/20191007134527_update_performance_history_table.rb.erb +19 -0
  42. data/lib/qa_server/configuration.rb +27 -5
  43. data/lib/qa_server/version.rb +1 -1
  44. metadata +10 -2
@@ -3,29 +3,14 @@ authority:
3
3
  service: ld4l_cache
4
4
  context: true
5
5
  search:
6
- -
7
- query: 'mark twain'
8
- -
9
- query: 'mark twain'
10
- subauth: person
11
- -
12
- query: 'Twain, Mark, 1835-1910'
13
- subauth: person
14
- -
15
- query: 'mark twain'
16
- subauth: organization
17
- -
18
- query: Cayuga
19
- subauth: place
20
6
  -
21
7
  query: Cayuga
22
- subauth: intangible
23
8
  -
24
9
  query: Cayuga
25
- subauth: geocoordinates
10
+ subauth: geographic
26
11
  -
27
- query: 'mark twain'
28
- subauth: work
12
+ query: ALA
13
+ subauth: conference
29
14
  term:
30
15
  -
31
16
  identifier: 'http://id.loc.gov/authorities/names/n92016188'
@@ -0,0 +1,27 @@
1
+ ---
2
+ authority:
3
+ service: ld4l_cache
4
+ context: true
5
+ search:
6
+ -
7
+ query: 'mark twain'
8
+ -
9
+ query: 'Twain, Mark, 1835-1910'
10
+ subauth: person
11
+ -
12
+ query: 'mark twain'
13
+ subauth: organization
14
+ -
15
+ query: 'twain'
16
+ subauth: family
17
+ -
18
+ query: 'Twain, Mark, 1835-1910'
19
+ subauth: person
20
+ position: 1
21
+ subject_uri: "http://id.loc.gov/rwo/agents/n79021164"
22
+ replacements:
23
+ maxRecords: '10'
24
+ context: true
25
+ term:
26
+ -
27
+ identifier: 'http://id.loc.gov/rwo/agents/n79021164'
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  authority:
3
3
  service: ld4l_cache
4
+ context: true
4
5
  search:
5
6
  -
6
7
  query: band
@@ -0,0 +1,255 @@
1
+ ---
2
+ authority:
3
+ service: ld4l_cache
4
+ context: true
5
+ search:
6
+ -
7
+ query: full
8
+ subauth: aspect_ratio
9
+ result_size: 130
10
+ -
11
+ query: essays
12
+ subauth: collective_title
13
+ result_size: 130
14
+ -
15
+ query: graph
16
+ subauth: illustrative_content
17
+ result_size: 130
18
+ -
19
+ query: single
20
+ subauth: mode_of_issuance
21
+ result_size: 130
22
+ -
23
+ query: letter
24
+ subauth: form_of_musical_notation
25
+ result_size: 130
26
+ -
27
+ query: case
28
+ subauth: carrier_extent_unit
29
+ result_size: 130
30
+ -
31
+ query: audio
32
+ subauth: carrier_type
33
+ result_size: 130
34
+ -
35
+ query: point
36
+ subauth: cartographic_data_type
37
+ result_size: 130
38
+ -
39
+ query: monochrome
40
+ subauth: colour_content
41
+ result_size: 130
42
+ -
43
+ query: image
44
+ subauth: content_type
45
+ result_size: 130
46
+ -
47
+ query: disc
48
+ subauth: generation
49
+ result_size: 130
50
+ -
51
+ query: paper
52
+ subauth: material
53
+ result_size: 130
54
+ -
55
+ query: audio
56
+ subauth: media_type
57
+ result_size: 130
58
+ -
59
+ query: positive
60
+ subauth: polarity
61
+ result_size: 130
62
+ -
63
+ query: title
64
+ subauth: recording_sources
65
+ result_size: 130
66
+ -
67
+ query: high
68
+ subauth: reduction_ratio
69
+ result_size: 130
70
+ -
71
+ query: video
72
+ subauth: regional_encoding
73
+ result_size: 130
74
+ -
75
+ query: audio
76
+ subauth: terms
77
+ result_size: 130
78
+ -
79
+ query: ring
80
+ subauth: type_of_binding
81
+ result_size: 130
82
+ # Deprecated
83
+ # -
84
+ # query: ALA
85
+ # subauth: base_material
86
+ # result_size: 130
87
+ -
88
+ query: print
89
+ subauth: production_method
90
+ result_size: 130
91
+ -
92
+ query: braille
93
+ subauth: form_of_tactile_notation
94
+ result_size: 130
95
+ -
96
+ query: folio
97
+ subauth: bibliographic_format
98
+ result_size: 130
99
+ -
100
+ query: PAL
101
+ subauth: broadcast_standard
102
+ result_size: 130
103
+ -
104
+ query: mono
105
+ subauth: config_playback_channels
106
+ result_size: 130
107
+ -
108
+ query: audio
109
+ subauth: file_type
110
+ result_size: 130
111
+ -
112
+ query: large
113
+ subauth: font_size
114
+ result_size: 130
115
+ -
116
+ query: choir
117
+ subauth: format_of_notated_music
118
+ result_size: 130
119
+ -
120
+ query: times
121
+ subauth: frequency
122
+ result_size: 130
123
+ -
124
+ query: male
125
+ subauth: gender
126
+ result_size: 120
127
+ -
128
+ query: fine
129
+ subauth: groove_pitch
130
+ result_size: 130
131
+ -
132
+ query: coarse
133
+ subauth: groove_width
134
+ result_size: 130
135
+ -
136
+ query: single
137
+ subauth: layout
138
+ result_size: 130
139
+ -
140
+ query: game
141
+ subauth: form_of_notated_movement
142
+ result_size: 130
143
+ -
144
+ query: standard
145
+ subauth: presentation_format
146
+ result_size: 130
147
+ # Deprecated
148
+ # -
149
+ # query: ALA
150
+ # subauth: prod_tactile
151
+ # result_size: 130
152
+ -
153
+ query: optical
154
+ subauth: recording_medium
155
+ result_size: 130
156
+ -
157
+ query: music
158
+ subauth: rofch
159
+ result_size: 120
160
+ # -
161
+ # query: ALA
162
+ # subauth: rofchrda
163
+ # result_size: 130
164
+ # -
165
+ # query: ALA
166
+ # subauth: rofem
167
+ # result_size: 130
168
+ # -
169
+ # query: ALA
170
+ # subauth: rofer
171
+ # result_size: 130
172
+ # -
173
+ # query: ALA
174
+ # subauth: rofet
175
+ # result_size: 130
176
+ # -
177
+ # query: ALA
178
+ # subauth: roffgrda
179
+ # result_size: 130
180
+ # -
181
+ # query: ALA
182
+ # subauth: rofhf
183
+ # result_size: 130
184
+ # -
185
+ # query: ALA
186
+ # subauth: rofid
187
+ # result_size: 130
188
+ # -
189
+ # query: ALA
190
+ # subauth: rofim
191
+ # result_size: 130
192
+ # -
193
+ # query: ALA
194
+ # subauth: rofin
195
+ # result_size: 130
196
+ # -
197
+ # query: ALA
198
+ # subauth: rofit
199
+ # result_size: 130
200
+ # -
201
+ # query: ALA
202
+ # subauth: rofitrda
203
+ # result_size: 130
204
+ # -
205
+ # query: ALA
206
+ # subauth: rofrm
207
+ # result_size: 130
208
+ # -
209
+ # query: ALA
210
+ # subauth: rofrr
211
+ # result_size: 130
212
+ # -
213
+ # query: ALA
214
+ # subauth: rofrt
215
+ # result_size: 130
216
+ # -
217
+ # query: ALA
218
+ # subauth: rofsf
219
+ # result_size: 130
220
+ # -
221
+ # query: ALA
222
+ # subauth: rofsfrda
223
+ # result_size: 130
224
+ # -
225
+ # query: ALA
226
+ # subauth: rofsm
227
+ # result_size: 130
228
+ -
229
+ query: scale
230
+ subauth: scale_designation
231
+ result_size: 130
232
+ -
233
+ query: sound
234
+ subauth: sound_content
235
+ result_size: 130
236
+ -
237
+ query: dolby
238
+ subauth: special_playback
239
+ result_size: 130
240
+ -
241
+ query: preliminary
242
+ subauth: status_of_identification
243
+ result_size: 130
244
+ -
245
+ query: edge
246
+ subauth: track_config
247
+ result_size: 130
248
+ -
249
+ query: digital
250
+ subauth: type_of_recording
251
+ result_size: 120
252
+ -
253
+ query: laser
254
+ subauth: video_format
255
+ result_size: 130
@@ -0,0 +1,6 @@
1
+ ---
2
+ authority:
3
+ service: direct
4
+ term:
5
+ -
6
+ identifier: http://www.wikidata.org/entity/Q8495
@@ -0,0 +1,32 @@
1
+ {
2
+ "QA_CONFIG_VERSION": "2.1",
3
+ "prefixes": {
4
+ },
5
+ "term": {
6
+ "url": {
7
+ "@context": "http://www.w3.org/ns/hydra/context.jsonld",
8
+ "@type": "IriTemplate",
9
+ "template": "{term_uri}",
10
+ "variableRepresentation": "BasicRepresentation",
11
+ "mapping": [
12
+ {
13
+ "@type": "IriTemplateMapping",
14
+ "variable": "term_uri",
15
+ "property": "hydra:freetextQuery",
16
+ "required": true,
17
+ "encode": false
18
+ }
19
+ ]
20
+ },
21
+ "qa_replacement_patterns": {
22
+ "term_id": "term_uri"
23
+ },
24
+ "term_id": "URI",
25
+ "language": ["en"],
26
+ "results": {
27
+ "label_ldpath": "skos:prefLabel",
28
+ "altlabel_ldpath": "skos:altLabel"
29
+ }
30
+ },
31
+ "search": {}
32
+ }
@@ -12,14 +12,23 @@ QaServer.config do |config|
12
12
  # @param [Boolean] display performance graph when true
13
13
  # config.display_performance_graph = false
14
14
 
15
- # Color of the graph line for load times in the performance graphs.
15
+ # Max time in milliseconds for y-axis in the performance graphs.
16
+ # @param [Integer] milliseconds
17
+ # config.performance_y_axis_max = 4000
18
+
19
+ # Color of the graph line for retrieve times in the performance graphs.
20
+ # @param [String] color RGB code
21
+ # @note The default colors for the retrieve, graph_load, load, normalization, and full request lines in the performance graph are accessible.
22
+ # config.performance_retrieve_color = '#ABC3C9'
23
+
24
+ # Color of the graph line for graph load times in the performance graphs.
16
25
  # @param [String] color RGB code
17
- # @note The default colors for the load, normalization, and full request lines in the performance graph are accessible.
18
- # config.performance_load_color = '#ABC3C9'
26
+ # @note The default colors for the retrieve, graph_load, normalization, and full request lines in the performance graph are accessible.
27
+ # config.performance_graph_load_color = '#E8DCD3'
19
28
 
20
- # Color of the graph line for normalization times (The default colors for the performance graph are accessible.)
29
+ # Color of the graph line for normalization times in the performance graphs
21
30
  # @param [String] color RGB code
22
- # @note The default colors for the load, normalization, and full request lines in the performance graph are accessible.
31
+ # @note The default colors for the retrieve, graph_load, load, normalization, and full request lines in the performance graph are accessible.
23
32
  # config.performance_normalization_color = '#CCBE9F'
24
33
 
25
34
  # Performance graph default time period for all graphs. All authorities will show the graph for this time period on page load.
@@ -0,0 +1,19 @@
1
+ class UpdatePerformanceHistoryTable < ActiveRecord::Migration<%= migration_version %>
2
+ def self.up
3
+ change_column :performance_history, :action, :integer
4
+ rename_column :performance_history, :load_time_ms, :retrieve_plus_graph_load_time_ms
5
+ add_column :performance_history, :retrieve_time_ms, :float, after: :size_bytes
6
+ add_column :performance_history, :graph_load_time_ms, :float, after: :retrieve_time_ms
7
+ add_column :performance_history, :action_time_ms, :float
8
+ add_index :performance_history, :action
9
+ end
10
+
11
+ def self.down
12
+ remove_index :performance_history, :action
13
+ remove_column :performance_history, :action_time_ms
14
+ remove_column :performance_history, :retrieve_time_ms
15
+ remove_column :performance_history, :graph_load_time_ms
16
+ rename_column :performance_history, :retrieve_plus_graph_load_time_ms, :load_time_ms
17
+ change_column :performance_history, :action, :string
18
+ end
19
+ end
@@ -25,15 +25,31 @@ module QaServer
25
25
  @display_performance_graph = false
26
26
  end
27
27
 
28
- # Color of the graph line for load times
28
+ # Max time in milliseconds for y-axis in the performance graphs.
29
+ attr_writer :performance_y_axis_max
30
+ def performance_y_axis_max
31
+ @performance_y_axis_max ||= 4000
32
+ end
33
+
34
+ # Color of the graph line for retrieve times in the performance graphs.
29
35
  # @param [String] color RGB code
30
- attr_writer :performance_load_color
31
- def performance_load_color
32
- @performance_load_color ||= '#ABC3C9'
36
+ # @note The default colors for the retrieve, graph_load, load, normalization, and full request lines in the performance graph are accessible.
37
+ attr_writer :performance_retrieve_color
38
+ def performance_retrieve_color
39
+ @performance_retrieve_color ||= '#ABC3C9'
33
40
  end
34
41
 
35
- # Color of the graph line for normalization times
42
+ # Color of the graph line for graph load times in the performance graphs.
36
43
  # @param [String] color RGB code
44
+ # @note The default colors for the retrieve, graph_load, load, normalization, and full request lines in the performance graph are accessible.
45
+ attr_writer :performance_graph_load_color
46
+ def performance_graph_load_color
47
+ @performance_graph_load_color ||= '#E8DCD3'
48
+ end
49
+
50
+ # Color of the graph line for normalization times in the performance graphs
51
+ # @param [String] color RGB code
52
+ # @note The default colors for the retrieve, graph_load, load, normalization, and full request lines in the performance graph are accessible.
37
53
  attr_writer :performance_normalization_color
38
54
  def performance_normalization_color
39
55
  @performance_normalization_color ||= '#CCBE9F'
@@ -92,5 +108,11 @@ module QaServer
92
108
  @navmenu_presenter.append_leftmenu_items(navmenu_extra_leftitems)
93
109
  @navmenu_presenter
94
110
  end
111
+
112
+ def performance_tracker
113
+ @performance_tracker ||= File.new('log/performance.csv', 'w').tap do |f|
114
+ f.puts('action, http request, load graph, normalization, TOTAL, data size, authority')
115
+ end
116
+ end
95
117
  end
96
118
  end