Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d897a75
Add insertCoin and unionValue costing skeleton
ana-pantilie Dec 5, 2025
3ed4321
Add benchmarking code and costing model for insertCoin
ana-pantilie Dec 5, 2025
9b566bd
Add benchmarking code and costing model for unionValue
ana-pantilie Dec 5, 2025
ab1312b
New models for insertCoin and unionValue; regenerate data
ana-pantilie Dec 5, 2025
54557fe
Fix model parsing and printing, wip scaleValue
ana-pantilie Dec 5, 2025
61d398b
Fix issues with rebase
ana-pantilie Dec 5, 2025
c81b534
Temp: experimenting with different inputs for unionValue
ana-pantilie Dec 5, 2025
a464a1c
Fix unionValue: shortcircuit if one is empty, flip args when second i…
ana-pantilie Dec 10, 2025
b74c996
Add alternative implementation for unionValue
ana-pantilie Dec 10, 2025
7d79538
Add new benchmarking scenarios
ana-pantilie Dec 10, 2025
a4a95bb
Tmp: scaleValue costing
ana-pantilie Dec 11, 2025
bf67123
UnionValue + ScaleValue generators, changes to unionValue builtin
ana-pantilie Dec 15, 2025
1fe564a
Data frames scaleVal unionValFInal
ana-pantilie Dec 15, 2025
9afbe70
Add model for unionValue
ana-pantilie Dec 15, 2025
fcb377d
Add cost models for insertCoin and unionValue
ana-pantilie Dec 15, 2025
0f47947
Remove experimental csv files and frames
ana-pantilie Dec 15, 2025
ed707b0
Fix cost model json
ana-pantilie Dec 15, 2025
c702815
Fix cost models
ana-pantilie Dec 15, 2025
0ba07d0
Fix cost model again
ana-pantilie Dec 15, 2025
849a372
Fixes for with-interaction, add boilerplate for scaleValue
ana-pantilie Dec 16, 2025
2085b40
Add scaleValue model to R code
ana-pantilie Dec 16, 2025
3d13a6f
Generate cost model for scaleValue
ana-pantilie Dec 16, 2025
5ca563a
Memory model for insertCoin, unionValue and scaleValue
ana-pantilie Dec 18, 2025
337279a
Regenerate json cost model files
ana-pantilie Dec 18, 2025
15bc3d5
Add tests to Haskell-R test suite
ana-pantilie Dec 18, 2025
ebf05d8
Clean-up
ana-pantilie Dec 18, 2025
696a21e
Add new cost model params to ledger api
ana-pantilie Dec 18, 2025
8d79fa7
Regenerate conformance test budgets
ana-pantilie Dec 18, 2025
5fe11fb
Fix intercept in cpu unionValue model
ana-pantilie Dec 18, 2025
93bdfe5
Regenerate budgets for unionValue conformance tests
ana-pantilie Dec 18, 2025
24491d1
Fix naming scheme for unionValue cost model
ana-pantilie Dec 18, 2025
fed80d8
Fix
ana-pantilie Dec 18, 2025
58c608b
Fix
ana-pantilie Dec 18, 2025
202ad33
Changelogs
ana-pantilie Dec 18, 2025
1fe82f1
Add new functions to vizualization website
ana-pantilie Dec 18, 2025
0889b78
Fixes
ana-pantilie Dec 18, 2025
2b15ad5
Fix?
ana-pantilie Dec 18, 2025
c9fc008
Add newtypes to denotations and regenerate golden files
ana-pantilie Dec 19, 2025
d529ba8
Address review comments
ana-pantilie Dec 20, 2025
78b9e7f
Merge remote-tracking branch 'origin/master' into ana/value-costing-f…
ana-pantilie Dec 24, 2025
85d1aa9
Add Value builtins to batch 6
ana-pantilie Dec 24, 2025
c411ba4
Address review comments
ana-pantilie Dec 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions doc/cost-models/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<li><a href="unvaluedata/index.html">UnValueData</a></li>
<li><a href="valuecontains/index.html">ValueContains</a></li>
<li><a href="lookupcoin/index.html">LookupCoin</a></li>
<li><a href="insertcoin/index.html">InsertCoin</a></li>
<li><a href="unionvalue/index.html">UnionValue</a></li>
<li><a href="scalevalue/index.html">ScaleValue</a></li>
<li><a href="listtoarray/index.html">ListToArray</a></li>
<li><a href="lengthofarray/index.html">LengthOfArray</a></li>
<li><a href="indexarray/index.html">IndexArray</a></li>
Expand Down Expand Up @@ -83,6 +86,30 @@ <h2>Available Visualizations</h2>
</p>
</li>

<li>
<a href="insertcoin/index.html">InsertCoin</a>
<p class="description">
Inserts a coin into a Plutus <code>Value</code> map structure.
(2D visualization: Value Size vs Time)
</p>
</li>

<li>
<a href="unionvalue/index.html">UnionValue</a>
<p class="description">
Unions two Plutus <code>Value</code> structures into one.
(3D visualization: Value Size × Value Size × Time)
</p>
</li>

<li>
<a href="scalevalue/index.html">ScaleValue</a>
<p class="description">
Multiplies a Plutus <code>Value</code> by a scalar, scaling all quantities.
(2D visualization: Value Size vs Time)
</p>
</li>

<li>
<a href="listtoarray/index.html">ListToArray</a>
<p class="description">
Expand Down
126 changes: 126 additions & 0 deletions doc/cost-models/insertcoin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>InsertCoin - Plutus Cost Model Visualization</title>
<link rel="stylesheet" href="../shared/styles.css">
<script src="https://cdn.plot.ly/plotly-2.27.0.min.js"></script>
</head>
<body>
<nav>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../valuedata/index.html">ValueData</a></li>
<li><a href="../unvaluedata/index.html">UnValueData</a></li>
<li><a href="../valuecontains/index.html">ValueContains</a></li>
<li><a href="../lookupcoin/index.html">LookupCoin</a></li>
<li><a href="../insertcoin/index.html" class="active">InsertCoin</a></li>
<li><a href="../unionvalue/index.html">UnionValue</a></li>
<li><a href="../scalevalue/index.html">ScaleValue</a></li>
<li><a href="../listtoarray/index.html">ListToArray</a></li>
<li><a href="../lengthofarray/index.html">LengthOfArray</a></li>
<li><a href="../indexarray/index.html">IndexArray</a></li>
</ul>
</nav>

<div class="container">
<h1>InsertCoin Cost Model Visualization</h1>
<p>
Interactive visualization of benchmark data and fitted cost model for the <code>InsertCoin</code> builtin.
This operation inserts or updates a coin (policy ID, token name, amount) into a <code>Value</code>.
The x-axis shows the Value size metric recorded during benchmarking (log outer size + log max inner size).
</p>

<div class="controls" id="data-source-controls">
<h3 id="data-source-toggle">Data Source Configuration</h3>
<div class="controls-content">
<div class="control-group-vertical">
<label for="branch-name">Branch name:</label>
<div class="branch-input-row">
<input type="text" id="branch-name" placeholder="master">
<button id="copy-link" title="Copy shareable link">Copy Link</button>
</div>
</div>
<div class="control-group-vertical">
<label for="csv-url">CSV file URL:</label>
<input type="text" id="csv-url" style="width: 100%; font-family: monospace;">
</div>
<div class="control-group-vertical">
<label for="json-url">JSON file URL:</label>
<input type="text" id="json-url" style="width: 100%; font-family: monospace;">
</div>
<div class="control-group">
<button id="reload-data">Load Data</button>
</div>
</div>
</div>

<div class="controls" id="plot-controls">
<h3 id="plot-controls-toggle">Plot Controls</h3>
<div class="controls-content">
<div class="control-group">
<input type="checkbox" id="show-model" checked>
<label for="show-model">Show model predictions</label>
</div>
<div class="control-group">
<label for="y-axis-mode">Y-axis range:</label>
<select id="y-axis-mode">
<option value="zero">Start from 0</option>
<option value="auto">Auto-scale from min</option>
</select>
</div>
</div>
</div>

<div class="plot-wrapper">
<div id="plot-container">
<div class="loading">Loading data and generating plot...</div>
</div>

<div class="info-panel">
<h3>Plot Information</h3>

<div class="info-section">
<dl>
<dt>Data points:</dt>
<dd id="info-data-points">-</dd>

<dt>Value size range (arg4):</dt>
<dd id="info-x-range">-</dd>

<dt>Time range:</dt>
<dd id="info-time-range">-</dd>
</dl>
</div>

<div class="info-section">
<dl>
<dt>Model type:</dt>
<dd id="info-model-type">-</dd>

<dt>Model formula:</dt>
<dd id="info-model-formula">-</dd>

<dt>Overhead:</dt>
<dd id="info-overhead">-</dd>
</dl>
</div>

<div class="info-section">
<dt>Data sources:</dt>
<dd><a href="https://github.com/IntersectMBO/plutus/blob/master/plutus-core/cost-model/data/benching-conway.csv" target="_blank">benching-conway.csv</a></dd>
<dd><a href="https://github.com/IntersectMBO/plutus/blob/master/plutus-core/cost-model/data/builtinCostModelC.json" target="_blank">builtinCostModelC.json</a></dd>
</div>
</div>
</div>
</div>

<footer>
<p>Plutus Cost Model Visualization | <a href="https://github.com/IntersectMBO/plutus" target="_blank">Plutus Repository</a></p>
</footer>

<script src="../shared/utils.js"></script>
<script src="plot.js"></script>
</body>
</html>
Loading