Skip to content

Commit d9360ca

Browse files
committed
fix: add rill
1 parent d267339 commit d9360ca

File tree

7 files changed

+122
-38
lines changed

7 files changed

+122
-38
lines changed

.gitignore

+4-38
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Rill
2+
*.db
3+
*.db.wal
4+
15
# Logs
26
logs
37
*.log
@@ -9,80 +13,59 @@ lerna-debug.log*
913

1014
# Diagnostic reports (https://nodejs.org/api/report.html)
1115
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12-
1316
# Runtime data
1417
pids
1518
*.pid
1619
*.seed
1720
*.pid.lock
18-
1921
# Directory for instrumented libs generated by jscoverage/JSCover
2022
lib-cov
21-
2223
# Coverage directory used by tools like istanbul
2324
coverage
2425
*.lcov
25-
2626
# nyc test coverage
2727
.nyc_output
28-
2928
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
3029
.grunt
31-
3230
# Bower dependency directory (https://bower.io/)
3331
bower_components
34-
3532
# node-waf configuration
3633
.lock-wscript
37-
3834
# Compiled binary addons (https://nodejs.org/api/addons.html)
3935
build/Release
40-
4136
# Dependency directories
4237
node_modules/
4338
jspm_packages/
44-
4539
# Snowpack dependency directory (https://snowpack.dev/)
4640
web_modules/
47-
4841
# TypeScript cache
4942
*.tsbuildinfo
50-
5143
# Optional npm cache directory
5244
.npm
53-
5445
# Optional eslint cache
5546
.eslintcache
56-
5747
# Optional stylelint cache
5848
.stylelintcache
59-
6049
# Microbundle cache
6150
.rpt2_cache/
6251
.rts2_cache_cjs/
6352
.rts2_cache_es/
6453
.rts2_cache_umd/
65-
6654
# Optional REPL history
6755
.node_repl_history
68-
6956
# Output of 'npm pack'
7057
*.tgz
71-
7258
# Yarn Integrity file
7359
.yarn-integrity
74-
7560
# dotenv environment variable files
7661
.env
7762
.env.development.local
7863
.env.test.local
7964
.env.production.local
8065
.env.local
81-
8266
# parcel-bundler cache (https://parceljs.org/)
8367
.cache
8468
.parcel-cache
85-
8669
# build output
8770
.next
8871
out
@@ -93,48 +76,31 @@ dist/
9376
# Comment in the public line in if your project uses Gatsby and not Next.js
9477
# https://nextjs.org/blog/next-9-1#public-directory-support
9578
# public
96-
9779
# vuepress build output
9880
.vuepress/dist
99-
10081
# vuepress v2.x temp and cache directory
10182
.temp
102-
.cache
103-
10483
# Docusaurus cache and generated files
10584
.docusaurus
106-
10785
# Serverless directories
10886
.serverless/
109-
11087
# FuseBox cache
11188
.fusebox/
112-
11389
# DynamoDB Local files
11490
.dynamodb/
115-
11691
# TernJS port file
11792
.tern-port
118-
11993
# Stores VSCode versions used for testing VSCode extensions
12094
.vscode-test
121-
12295
# yarn v2
12396
.yarn/cache
12497
.yarn/unplugged
12598
.yarn/build-state.yml
12699
.yarn/install-state.gz
127100
.pnp.*
128-
129-
130101
# generated types
131102
.astro/
132-
133103
# logs
134-
npm-debug.log*
135-
yarn-debug.log*
136-
yarn-error.log*
137104
pnpm-debug.log*
138-
139105
# macOS-specific files
140106
.DS_Store

seer/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
*.db
3+
*.db.wal

seer/README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Infrastructure Cost Monitoring
2+
An example project that explores how Rill can be used to monitor cloud infrastructure over time.
3+
4+
If you have added the full Rill Example project, run `rill start` from this directory to get started.
5+
6+
To run this example specifically:
7+
8+
```
9+
git clone https://github.com/rilldata/rill-examples.git
10+
cd rill-examples/rill-cost-monitoring
11+
rill start
12+
```
13+
14+
Rill will build your project from data sources to dashboard and then launch in a new browser window.
15+
16+
## Overview
17+
This dataset is modeled after a similar dashboard we use internally at Rill to both identify opportunities to improve our cloud infrastructure operations and to manage customer implementations. Typical users would include engineering, customer success and finance. In this example, we’ve tied together a combination of cloud services, other hosting costs, and revenue metrics.
18+
19+
## Data Model
20+
In this dataset, you’ll see:
21+
22+
Key Dimensions:
23+
- SKU (cloud provider services)
24+
- Pipeline (internal data pipeline name)
25+
- App Name (cloud provider application)
26+
27+
Key Metrics:
28+
- Revenue and cost
29+
30+
## Dashboard Details
31+
Some typical analyses that we use the monitoring dashboard for:
32+
- Compare margin across customers to understand if a particular implementation can be enhanced
33+
- Trend cloud services at a highly granular level to understand revenue leakage
34+
- Quickly drill in on spikes in usage to identify opportunities for optimization
+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Visit https://docs.rilldata.com/reference/project-files to learn more about Rill project files.
2+
3+
title: "Customer Unit Economics Dashboard"
4+
model: "metrics_margin_model"
5+
type: metrics_view
6+
default_time_range: "P4W"
7+
smallest_time_grain: "day"
8+
timeseries: "__time"
9+
measures:
10+
- label: "Total Cost"
11+
expression: "SUM(cost)"
12+
name: measure
13+
description: "The sum of cost"
14+
format_preset: currency_usd
15+
- label: "Total Revenue"
16+
expression: SUM(revenue)
17+
name: total_records
18+
description: The sum of revenue
19+
format_preset: currency_usd
20+
- label: "Net Revenue"
21+
expression: "SUM(revenue) - SUM(cost)"
22+
name: measure_2
23+
description: "The sum of revenue minus the sum of cost"
24+
format_preset: currency_usd
25+
- label: "Gross Margin %"
26+
expression: "(SUM(revenue) - SUM(cost))/SUM(revenue)"
27+
name: measure_1
28+
description: "Net revenue divided by sum of revenue"
29+
format_preset: percentage
30+
- label: "Unique Customers"
31+
expression: "COUNT(DISTINCT company)"
32+
name: measure_3
33+
description: "The count of unique companies"
34+
format_preset: humanize
35+
dimensions:
36+
- label: Customer
37+
column: company
38+
description: "The name of the customer"
39+
- label: Plan Name
40+
column: plan_name
41+
description: "The name of the billing plan"
42+
- label: "Cost by Region"
43+
column: "location"
44+
description: "The region incurring costs"
45+
- label: Cost by Component
46+
column: component
47+
description: "The component generating costs"
48+
- label: "Cost by App Name"
49+
column: "app_name"
50+
description: "The app generating costs"
51+
- label: "Cost by SKU"
52+
column: "sku_description"
53+
description: "The sku description for costs"
54+
- label: "Cost by Data Pipeline"
55+
column: "pipeline"
56+
description: "The pipeline incurring costs"
57+
- label: "Cost by Environment"
58+
column: "environment"
59+
description: "The environment incurring costs"
60+
available_time_zones:
61+
- America/Los_Angeles
62+
- America/Chicago
63+
- America/New_York
64+
- Europe/London
65+
- Europe/Paris
66+
- Asia/Jerusalem
67+
- Europe/Moscow
68+
- Asia/Kolkata
69+
- Asia/Shanghai
70+
- Asia/Tokyo
71+
- Australia/Sydney

seer/models/metrics_margin_model.sql

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
select * from metrics_margin_monitoring ORDER BY 1 DESC

seer/rill.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
compiler: rill-beta
2+
rill_version: 0.25.2
3+
4+
title: Infra Cost Margins Monitoring Demo
5+
description: This dashboard identifies opportunities to improve cloud infrastructure operations and to manage customer implementations. In this example, we’ve tied together a combination of cloud services, other hosting costs, and revenue metrics. Cost is the primary metric with insight into Revenue and Margins by Customer.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Visit https://docs.rilldata.com/ to learn more about Rill code artifacts.
2+
type: source
3+
connector: "https"
4+
uri: "https://storage.googleapis.com/rilldata-public/metrics_margin_monitoring.parquet"

0 commit comments

Comments
 (0)