-
Notifications
You must be signed in to change notification settings - Fork 441
BI Database Queries
Henne Vogelsang edited this page Feb 14, 2023
·
6 revisions
Some interesting business intelligence queries you can run for various OBS features
start_date = DateTime.parse('2022-11-01').beginning_of_day
end_date = DateTime.parse('2023-01-31').end_of_day
- Active:
User.where(last_logged_in_at: start_date..end_date).count
- Sign Ups:
User.where(created_at: start_date..end_date).count
- Commits:
ProjectLogEntry.where(event_type: :commit).where(datetime: start_date..end_date).count
- Binaries Released:
BinaryRelease.where(binary_buildtime: start_date..end_date).count
- Service Runs:
ProjectLogEntry.where(event_type: [:service_fail, :service_success]).where(datetime: start_date..end_date).count
- SCM Workflows executed:
WorkflowRun.where(created_at: start_date..end_date).count
- Requests reached final state:
HistoryElement::Base.where(created_at: start_date..end_date).where(type: ['HistoryElement::RequestAccepted', 'HistoryElement::RequestDeclined']).count
- Reviews finished:
HistoryElement::Base.where(created_at: start_date..end_date).where(type: ['HistoryElement::ReviewAccepted', 'HistoryElement::ReviewDeclined']).count
- Comments given:
Comment.where(created_at: start_date..end_date).count
- Stagings:
ProjectLogEntry.where(event_type: [:staged_request, :unstaged_request, :staging_project_created]).where(datetime: start_date..end_date).group(:event_type).count
- Development Environment Overview
- Development Environment Tips & Tricks
- Spec-Tips
- Code Style
- Rubocop
- Testing with VCR
- Authentication
- Authorization
- Autocomplete
- BS Requests
- Events
- ProjectLog
- Notifications
- Feature Toggles
- Build Results
- Attrib classes
- Flags
- The BackendPackage Cache
- Maintenance classes
- Cloud uploader
- Delayed Jobs
- Staging Workflow
- StatusHistory
- OBS API
- Owner Search
- Search
- Links
- Distributions
- Repository
- Data Migrations
- next_rails
- Ruby Update
- Rails Profiling
- Installing a local LDAP-server
- Remote Pairing Setup Guide
- Factory Dashboard
- osc
- Setup an OBS Development Environment on macOS
- Run OpenQA smoketest locally
- Responsive Guidelines
- Importing database dumps
- Problem Statement & Solution
- Kickoff New Stuff
- New Swagger API doc
- Documentation and Communication
- GitHub Actions
- How to Introduce Software Design Patterns
- Query Objects
- Services
- View Components
- RFC: Core Components
- RFC: Decorator Pattern
- RFC: Backend models