{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "运行 BenchmarkDotnet 基准测试\n", "============================" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## 全局设置" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "dotnet_interactive": { "language": "csharp" }, "polyglot_notebook": { "kernelName": "csharp" } }, "outputs": [ { "data": { "text/html": [ "
Restore sources
Installed Packages
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "Loading extensions from `C:\\Users\\ruyu\\.nuget\\packages\\microsoft.data.analysis\\0.22.0\\interactive-extensions\\dotnet\\Microsoft.Data.Analysis.Interactive.dll`" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "Loading extension script from `C:\\Users\\ruyu\\.nuget\\packages\\microsoft.dotnet.interactive.extensionlab\\1.0.0-beta.25177.1\\interactive-extensions\\dotnet\\extension.dib`" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Create strongly-typed dataframes using#!linqify.\r\n", "

The #!linqify magic command replaces a Microsoft.Data.Analysis.DataFrame variable with a generated, strongly-typed data frame, allowing the use of LINQ operations over the contained data.

\r\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
ExplainCode\r\n", "

This extension generates Sequence diagrams from csharp code using Mermaid kernel.

\r\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Inspect code compilation details using the #!inspect magic command.\r\n", "

The #!inspect magic command allows you to see the C# decompilation, IL, and JIT Asm for the code in a C# cell.

\r\n", " \r\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Use the #!record magic command to keep a transcript of the code you run.\r\n", "

Once you enable transcripts using #!record, each code submission (including re-running cells) is recorded in the specified file. The JSON format used is the same format recognized by the .NET Interactive stdio and http APIs and can be used to replay an interactive session via automation.

\r\n", " \r\n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "// 默认包源\n", "#i \"nuget:https://api.nuget.org/v3/index.json\"\n", "\n", "//Nuget 包引用\n", "#r \"nuget: Microsoft.DotNet.Interactive.ExtensionLab,*-*\"\n", "\n", "//全局变量" ] } ], "metadata": { "kernelspec": { "display_name": ".NET (C#)", "language": "C#", "name": ".net-csharp" }, "language_info": { "name": "polyglot-notebook" }, "orig_nbformat": 4, "polyglot_notebook": { "kernelInfo": { "defaultKernelName": "csharp", "items": [ { "aliases": [], "name": "csharp" }, { "aliases": [], "name": "razor" } ] } } }, "nbformat": 4, "nbformat_minor": 2 }